Forums | Mahara Community

Developers /
Accessing current language in theme templates

Howard Miller's profile picture
Posts: 120

10 August 2011, 5:12 AM

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
Deleted user
Posts: 48

10 August 2011, 5:00 PM

Hi Howard,


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


You could do something like

{if $sitedefaultlang='en'}
{elsif $sitedefaultlang='fr'}





Hugh Davenport

Howard Miller's profile picture
Posts: 120

18 August 2011, 10:10 AM

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

3 results