Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Blog refuses to use locale settings


Reply


287 Views

Avatar
Fairfax71

Community Member, 13 Posts

29 November 2012 at 9:17pm

Hi all,

I'm using the latest install of the blog module and Silverstripe 3.0.3. I've been trying to get the blog to use the de_DE locale, but with no luck at all – it insists on using the default en_US formatting for date and time.

I checked the server and the German locale must be set to de_DE.UTF8. I've tried this in mysite/_config.php as well as in blog/_config.php:

// Set the site locale
setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge', 'de_DE.UTF8');
i18n::set_locale('de_DE');
i18n::include_locale_file('blog', 'de_DE');

and also tried creating a lang file called de_DE.UTF8.php and setting

i18n::set_locale('de_DE.UTF8');
i18n::include_locale_file('blog', 'de_DE.UTF8');

but to no avail.

Help?