Jump to:

3444 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » Multilingual WebSite

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

Page: 1
Go to End
Author Topic: 1049 Views
  • Tonyair
    Avatar
    Community Member
    81 Posts

    Multilingual WebSite Link to this post

    Hello, guys.
    I was managed to do multilingual website, everything works perfect, but locale switching

    I have 2 files en_US.php and ru_RU.php in mysite/lang/ folder there're some params for templates, like:

    $lang['en_US']['Page.ss']['BTN_FEEDBACK'] = 'feedback'; inside en_US.php

    when i changing language of website content is changing and function Translatable::get_current_locale() returns en_US, content is changing, but those variables are still taken from ru_RU.php file.

    I tried to add self::set_current_locale(Translatable::get_current_locale()); in Page_Controller->init(); and nothing has changed

  • Tonyair
    Avatar
    Community Member
    81 Posts

    Re: Multilingual WebSite Link to this post

    Sorry, just solved that problem =)

    i18n::set_locale(Translatable::get_current_locale());

    1049 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.