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.

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

Changing default language


Go to End


1747 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