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

Changing default language


Reply


1093 Views

Avatar
Nic

Community Member, 2 Posts

15 June 2009 at 9:54pm

I'm working on a site with 5 different languages where English is the original default language. Now my customer wants the visitor to see the Swedish version first when they enter the site.

Since the customer already has a lot of content it's not an option of remaking the structure of the site.

The site uses SilverStripe 2.2.1 and upgrading is NOT an option.

putting

i18n::enable();
i18n::set_default_lang('sv_SE');
i18n::set_locale('sv_SE');

in mysite/_config.php

only manages to change the name of the default language in the admin system and does NOTHING for the actually changing the default language presentet to the visitor.

Is there any solution to this problem or am I f***ed?

Best regards
Nic