To localize Date and Time, use the date_i18n() function. The date_i18n() function basically behaves like the PHP date() function, except that it also translates things like month names and weekdays and similar into the current locale for the site. You can replace a call to date() with a call to date_i18n(), using the same arguments.

Alternatively, you can wrap your predefined format in __() or _e() in order to allow translators to adjust the Date and Time to the proper local format. If you do so, then you should also include a translator comment, to let the translators know what the date format is referring to and where it is used, so they can convert it accurately.




19 Jul, Guido

Inside the template file, setting the Date and Time format string as a parameter for the_time() template tag, would look something like this

Lorem Ipsum

19 Jul, Guido

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi quis tristique neque.


A new (programmatic) adventure

18 Jul, Guido

So here we are. Started this adventure in the pursue of a dream: The dream of helping brands to make better advertising campaigns in the digital world.