Language menu not working on homepage

Language menu not working on homepage

by David Keenan -
Number of replies: 1

LANGUAGE MENU NOT WORKING ON HOMEPAGE

Hi Folks,

If anyone is having a problem with the language menu on their homepage of their moodle site there is a simple fix. You should edit a line in your index.php file to the code I have submitted below.

This may be a short-cut but it works a treat for us

Regards

David Keenan

Instead of:

if (empty($CFG->langmenu)) {
$langmenu = "";
} else {
$currlang = current_language();
$langs = get_list_of_languages();
$langmenu = popup_form ("$CFG->wwwroot/?lang=", $langs, "chooselang", $currlang, "", "", "", true);
}

It should be:

if (empty($CFG->langmenu)) {
$langmenu = "";
} else {
$currlang = current_language();
$langs = get_list_of_languages();
$langmenu = popup_form ("$CFG->wwwroot/index.php?lang=", $langs, "chooselang", $currlang, "", "", "", true);
}

Average of ratings: -
In reply to David Keenan

Re: Language menu not working on homepage

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
If you have a DirectoryIndex defined for Apache then this shouldn't be necessary .. the install document has information about this.

But helpful info anyway, thanks.