Hi all,
I am using Moodle 2.6.4 and essential theme 2.6.10. I have to create a toggle button for two language packs installed in my moodle for english and hindi languages.
I tried with this code in header.php:
<?php
$lang=$CFG->lang;
if ($lang=='en') {echo '<a id="hindi" class="hindi" href="mymoodle/?lang=hi" target="_parent"><img src="mypath/hindi.gif" /></a>';} else if ($lang =='hi'){
echo '<a id="english" class="english" href="mymoodle/?lang=en" target="_parent" ><img src="mypath/english.gif" /></a>';}
How do i get the current language so that button changed accordingly?
Please help me to solve this issue...
Thanks & Regards...