[TYPO3-dev] How to set locale for backend?

bernd wilke t3ng at bernd-wilke.net
Mon Oct 27 08:48:47 CET 2014


Am 26.10.14 16:29, schrieb Charles Brunet:
> Hello,
>
> I wrote a backend module using extbase (TYPO3 6.2). I want to display
> localized date. If my fliud template, I have:
>
> <f:format.date format="%e %B %Y">{feuillet.date}</f:format.date>
>
> However, the date always is written in English, whatever the backend
> language is.
>
> I temporary solved the problem putting
>
> setlocale(LC_TIME, 'fr_CA.utf8');
>
> in the initializeAction function of my controller, but this is more a hack
> than a real solution.
>
>
> What is the proper way to set the locale for the backend?
>

have a look at the wiki[1]:
| Be aware: as the php function date() is not capable of localisation
| you have no chance to get local named times (weekday, month)
|
| Since Feb 2013 the functionality of this viewhelper is extended: you
| can use strftime-format-strings (recognized by the usage of '%' in
| the format-string) and use localisation for weekdays and month.

[1] http://wiki.typo3.org/Fluid#f:format.date

bernd
-- 
http://www.pi-phi.de/cheatsheet.html



More information about the TYPO3-dev mailing list