Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

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.

Data Model Questions /

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

Set current_lang for site


Go to End


5 Posts   2341 Views

Avatar
JulyCat

Community Member, 9 Posts

6 February 2009 at 9:41am

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?

Avatar
Fuzz10

Community Member, 791 Posts

6 February 2009 at 9:27pm

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 .... ;-)

Avatar
JulyCat

Community Member, 9 Posts

7 February 2009 at 12:54am

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

Avatar
Fuzz10

Community Member, 791 Posts

7 February 2009 at 12:57am

In /mysite

Avatar
JulyCat

Community Member, 9 Posts

8 April 2009 at 10:57pm

Thank you! It works.