1778 Posts in 581 Topics by 555 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 258 Views |
-
[SOLVED] Login form translation only partially working

11 November 2011 at 3:33am
hi.
I have some pages in my CMS that are secured so you have to log in to see them. Example: http://www.bangkran.de/praesentationen
The language of my page is german. However, the login form translates not everthing of its content. As you can see, the "That page is secured. Enter your credentials..." part is still english. This is weired since there is a translation for it available in the sapphire/lang/de_DE.php file.$lang['de_DE']['Security']['NOTEPAGESECURED'] = 'Diese Seite ist geschützt. Bitte melden Sie sich an und Sie werden sofort weitergeleitet.';
my _config.php
Translatable::set_default_locale('de_DE');
Translatable::set_allowed_locales(array('de_DE','en_US','ru_RU'));Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');What's the problem / my mistake ?
Thank you in advance
Martin -
Re: [SOLVED] Login form translation only partially working

12 November 2011 at 2:37am Last edited: 12 November 2011 2:43am
Translatable is for database content. Use i18n for templates and forms.
i18n::set_default_lang("de_DE");
i18n::set_locale('de_DE');http://doc.silverstripe.org/sapphire/en/topics/i18n
http://doc.silverstripe.org/sapphire/en/topics/translation -
Re: [SOLVED] Login form translation only partially working

12 November 2011 at 4:51am
i18n::set_default_lang() is deprecated, it calls Translatable::set_default_lang() ;)
But i18n::set_default_locale() did the trick, thank you !
| 258 Views | ||
|
Page:
1
|
Go to Top |


