Forums | Mahara Community

Developers /
Accessing current language in theme templates


Howard Miller's profile picture
Posts: 191

10 August 2011, 5:12

Is there any way that I can discover what the currently selected language is from inside a theme tpl file? Basically, I have a requirement to display a different graphic depending on the current selected language. 

 

Cheers :)

anonymous profile picture
Account deleted
Posts: 48

10 August 2011, 17:00

Hi Howard,

 

You should be able to use the variable {$sitedefaultlang}.

 

You could do something like

{if $sitedefaultlang='en'}
english
{elsif $sitedefaultlang='fr'}
french
...
{/if} 

 

 

Cheers,

 

Hugh Davenport

Howard Miller's profile picture
Posts: 191

18 August 2011, 10:10

Thanks for your reply (sorry I took so long). I'll give that a try :)

3 results