Mahara Community - Developers - Accessing current language in theme templates - All postshttps://mahara.org/,t,3915https://mahara.org/theme/mahara-org/images/site-logo.svghttps://mahara.org/favicon.ico
Mahara
2011-08-18T10:10:58+13:00Re: Accessing current language in theme templateshttps://mahara.org/,3915,17398Thanks for your reply (sorry I took so long). I'll give that a try :) ]]>Howard Miller2011-08-18T10:10:58+13:00Re: Accessing current language in theme templateshttps://mahara.org/,3915,17310Hi 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
]]>2011-08-10T17:00:07+13:00Accessing current language in theme templateshttps://mahara.org/,3915,17304Is 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.