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
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
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.
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
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.
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
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
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
Thank you cerelac! That works perfectly :-))
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.
vispi, I forgot to tell you to remove this line:
i18n::set_locale('de_DE');
Best Regards