This shows you the differences between two versions of the page.

Link to this comparison view

date_localization [2011/06/09 12:46]
date_localization [2011/06/09 12:46] (current)
Line 1: Line 1:
 +===== Date Localization =====
 +You can localize the date and time within PHP by following these steps:
 +1. Verify that the correct locales are installed on the server.
 +<code bash>
 +> locale -a
 +[email protected]
 +[email protected]
 +2. Set the locale within PHP.
 +<code php>
 +setlocale(LC_TIME,​ '​fr_FR'​);​
 +3. Call strftime() to output the localized date.
 +<code php>
 +echo strftime('​%e %B %Y');