Issue
I use Poedit to translate my website but I am stuck on how to translate the days of the week and the months if I display them with php like this:
$day_of_week_in_words->format("l")
Solution
If your server has the LC language library you can simply use php functions without any poedit interactions You can find the details here strftime simple examples:
setlocale(LC_TIME, "fi_FI");
echo strftime(" in Finnish is %A,"); //%A means A full textual representation of the day Sunday through Saturday
setlocale(LC_TIME, "fr_FR");
echo strftime(" in French %A and");
setlocale(LC_TIME, "de_DE");
echo strftime(" in German %A.\n");
Answered By - Santa's helper Answer Checked By - Mary Flores (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.