17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1259 Views |
-
Switching languages. How to make the allocation of the current language?

5 June 2008 at 11:24pm Last edited: 5 June 2008 11:29pm
How to make the allocation of the current language?
In Page.ss I have next code<div id="LangBar">
<a href="./?lang=ru">àãááÃÅ¡ÃËœÃâ„¢</a> <a href="./?lang=en">ENGLISH</a>
</div>How I can use Session::get('currentLang'); in Page.ss
in HTML code i wont get next
<div id="LangBar">
<a href="./?lang=ru" class="Selected">àãááÃÅ¡ÃËœÃâ„¢</a> <a href="./?lang=en">ENGLISH</a>
</div> -
Re: Switching languages. How to make the allocation of the current language?

26 August 2008 at 11:11am
hi, have you found a way of getting th current language?
bye -
Re: Switching languages. How to make the allocation of the current language?

26 August 2008 at 6:02pm
no ((
-
Re: Switching languages. How to make the allocation of the current language?

26 August 2008 at 7:34pm
You can get the current language in your php by using - Translatable::current_lang() . If you need it from the template I think you will need to create a function in your PHP code and call it from your template.
in mysite/code/Page.php in the Page_Controller class
function CurrentLang() {
return Translatable::current_lang();
}Then in your template you can use $CurrentLang, tho I would assume there is some built in method for this...
-
Re: Switching languages. How to make the allocation of the current language?

26 August 2008 at 11:58pm
great willr thnks!!
| 1259 Views | ||
|
Page:
1
|
Go to Top |



