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

Silverstripe allways start's in English!(stage)


Reply

2 Posts   938 Views

Avatar
gonace

27 April 2010 at 6:56pm (Last edited: 27 April 2010 7:19pm), Community Member, 11 Posts

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

28 April 2010 at 5:54am Community Member, 94 Posts

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.