Forums | Mahara Community
Developers
/
Accessing current language in theme templates
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 :)
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
18 August 2011, 10:10
Thanks for your reply (sorry I took so long). I'll give that a try :)