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

Silverstripe allways start's in English!(stage)


Go to End


2 Posts   1289 Views

Avatar
gonace

Community Member, 11 Posts

27 April 2010 at 6:56pm

Edited: 27/04/2010 7:19pm

I've been scratching my head for a while now, been trying everything I could find in this forums but nothing helps! When I enter my homepage it's always in English, I've added the following to _config.php

//Set Default Language
i18n::enable();
i18n::set_locale('sv_SE');
i18n::set_default_lang('sv_SE');
Translatable::set_default_lang('sv_SE');

The site response:
The requested page couldn't be found.

But if i add "?stage=Live&locale=sv_SE" The Swedish site appears!

But can't get it to work! I've tried to empty the database and start from scratch but if i don't add a page for "English" the site won't open, and if I add a page for "English" it always opens the English version of the page!

How hard can it be to get another language as default/start language?

Avatar
bartvanirsel

Community Member, 96 Posts

28 April 2010 at 5:54am

hi gonace,

i had a similar problem. If i remember it correctly i solved this by chaning the url and/ or title of the page you need to be the
default language in 'home'. Name the other one something like 'home_en'

I'm curious if this will solve your problem.