Jump to:

23376 Posts in 18176 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Possible bug in class i18n?

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

Page: 1
Go to End
Author Topic: 774 Views
  • Krigu
    Avatar
    Community Member
    7 Posts

    Possible bug in class i18n? Link to this post

    Hi all

    I'm trying to translate my forum module and the admin in german. But it did not translate at all...

    In my _config.php i changed:

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

    But it still did not work.. After a debug session i changed the method _t in the class i18n and everything works find now.. I changed the line

    f(!isset($lang[$locale])) i18n::include_by_locale($locale);

    to

    if(!isset($lang[$locale][$class])) i18n::include_by_locale($locale);

    and now it includes the language file and the strings are translated. I think the variable $lang[$locale] is always assigned, but not the $lang[$localte][$class].. The variable $class represents the name of the module (e.g. 'Forum')

    Is this a possible bug or have i just configured something wrong?

    Greetings
    Krigu

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Possible bug in class i18n? Link to this post

    Sounds like a bug. Make a ticket on open.silverstripe.org and one of the core devs will get back to you.

    774 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.