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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

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

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

SS 2.3.3 Translatable & browser language settings


Go to End


4 Posts   1682 Views

Avatar
karibe

Community Member, 56 Posts

17 September 2009 at 9:03pm

Hello

I'm upgrading ss cmsed site to multi language version. How can I read browser language settings to set up site serving language?

Avatar
karibe

Community Member, 56 Posts

23 September 2009 at 1:14am

Impossible? Nobody knows?

Avatar
dalesaurus

Community Member, 283 Posts

23 September 2009 at 2:52am

You'll need to write a small bit of code to read the User Agent and switch the language.

1. Figure out the language, likely with $_SERVER["HTTP_ACCEPT_LANGUAGE"]
2. Switch it automatically, likely in your init() of Page_Controller. You can find the code to switch on the wiki:

http://doc.silverstripe.com/doku.php?id=recipes:pretty_i18n_urls

http://doc.silverstripe.com/doku.php?id=recipes:multilingual_content

Avatar
one

Community Member, 6 Posts

3 October 2009 at 6:05pm

Hello

A lot of people have the same problem.
Just Like BUGS!

I think that better,
From a beginning, Admin get possible to manage language.