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.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Set start Language


Go to End
Reply

9 Posts   3830 Views

Avatar
vispi

2 July 2008 at 9:02pm Community Member, 3 Posts

Hello,

how can i set a new standard Language for user in a multilanguage environment?

via ?lang=de and ?lang=en works, but on first visit its english not german?

i18n::set_default_lang('de'); // for German not work

Kind Regards

Avatar
cliersch

3 July 2008 at 1:45am Community Member, 75 Posts

Hi vispi,
try this in the mysite/_config.php
i18n::set_locale('de_DE');
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');

but...
...does anybody knows how to change the meta tag content language
<meta http-equiv="Content-Language" content="en">

I couldn't find any settings how to switch the content language.

Avatar
cerelac

3 July 2008 at 5:10am (Last edited: 3 July 2008 5:10am), Community Member, 34 Posts

Hi.

vispi, try putting this in your "_config.php" file:

i18n::enable();
i18n::set_default_lang('de_DE');

tiga, I think that if you use this code in your native language, your problem will be solved.

Best Regards

Avatar
vispi

3 July 2008 at 6:53pm Community Member, 3 Posts

hi,

_config.php includes now

i18n::enable();
i18n::set_default_lang('de_DE'); // for German
i18n::set_locale('de_DE');
setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
HTTP::set_cache_age(0);

But Visit Start-Languageare english and CMS Languages now German (Germany) = English Version and German = German Version.

<meta http-equiv="Content-Language" content="de"> not work.

Best Regards

Avatar
cerelac

3 July 2008 at 9:12pm Community Member, 34 Posts

vispi, try removing this code in your "_config.php" file:

setlocale (LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
HTTP::set_cache_age(0);

Best Regards

Avatar
cliersch

4 July 2008 at 1:11am Community Member, 75 Posts

Thank you cerelac! That works perfectly :-))

Avatar
vispi

4 July 2008 at 1:54am Community Member, 3 Posts

sorry, but it's not work.

_config.php:

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

Content was english but Security/login = German?

Strange.

Avatar
cerelac

4 July 2008 at 3:41am Community Member, 34 Posts

vispi, I forgot to tell you to remove this line:

i18n::set_locale('de_DE');

Best Regards

Go to Top