Jump to:

3429 Posts in 1057 Topics by 734 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Set current_lang for site

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

Page: 1
Go to End
Author Topic: 1289 Views
  • JulyCat
    Avatar
    Community Member
    9 Posts

    Set current_lang for site Link to this post

    Hi!
    How can I set value for current_lang (in my case Russian)?

    Now pages of my site includes this line:
    <meta http-equiv="Content-Language" content="en">

    but I need
    <meta http-equiv="Content-Language" content="ru">

    I found the code in ...\sapphire\core\model\SiteTree.php on line 682

    There are suggestions?

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: Set current_lang for site Link to this post

    Set the default language in your _config.php

    i18n::enable();
    i18n::set_default_lang('xx'); Where xx is your i8n code .. I'm guessing it'll be ru .... ;-)

  • JulyCat
    Avatar
    Community Member
    9 Posts

    Re: Set current_lang for site Link to this post

    Where can I find this _config.php (in /mysite/ or /sapphire/)?

  • Fuzz10
    Avatar
    Community Member
    787 Posts

    Re: Set current_lang for site Link to this post

    In /mysite

  • JulyCat
    Avatar
    Community Member
    9 Posts

    Re: Set current_lang for site Link to this post

    Thank you! It works.

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