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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Template Questions /

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

Translating static content


Go to End


17 Posts   10341 Views

Avatar
martimiz

Forum Moderator, 1391 Posts

26 November 2011 at 5:41am

>> are no longer switching languages...

I'm a bit confused... :-( Do you mean they did switch before this fix, while the php didn't? Or did they never?

Anyway, for SilverStripe javascript (ss.i18n.js) to detect the right locale, you need something like this in your template, that's where the detectLocale() function tries to find the current locale:

<meta http-equiv="Content-Language" content="$ContentLocale"/>

Also the right js translation file needs to be present in sapphire/javascript/lang/ (there are only a few). I know there were some other issues, but I can't quite remember... :-(

Go to Top