SilverCart Forum

We moderate this Forum and we're here to help. Have you already run a forum search to check if your problem has already been solved?

You can help us helping you by providing detailed error messages, screenshots and logfile entries.

SebastianRamon

Page: 1
Topic default language 4741 Views

default language

29 April 2013 at 8:08pm

Hallo,

I add the language German, so I have two languages, German and English.
Everything works very well.
I try to set the Default language in German. But i can't.
In config.php in Folder mySite I added:
i18n::enable();
i18n::set_locale('de_DE');

But it doesn't work.

Can anybody help me?

Regards
Michael

Re: default language

30 April 2013 at 11:42am

Hello Michael,

try using the following code in your "_config.php":

Translatable::set_default_locale("de_DE");
i18n::set_default_locale('de_DE');

This should set the website to german by default. If you still get the english version try deleting your cookies.

Greetings,
Sascha

Re: default language

30 April 2013 at 1:11pm

Thank you Sascha for your answer.
Unfortunately, it doesn't work.
The code must be in _config.php in the Folder Mysite, isn't it?
After that I deleted the Cookies. Still it doesn't work.

What can I check else? I can choose German without Problems. But the Default language is still English.

Regards Michael

Re: default language

30 April 2013 at 5:15pm

Hello Michael,

the code snippets should be inserted into "mysite/_config.php".

We just tested this setting with two projects here and it works a treat.

Make sure that in your _config.php the settings are as following:

Translatable::set_default_locale("de_DE");
i18n::enable();
i18n::set_default_locale('de_DE');

Greetings,
Sascha