MDL-66197 core: correct get parent language

This commit is contained in:
Marina Glancy 2019-07-20 18:02:56 +03:00
parent 6735197cc2
commit 54f2d0c49e

View File

@ -7070,21 +7070,12 @@ function current_language() {
*/
function get_parent_language($lang=null) {
// Let's hack around the current language.
if (!empty($lang)) {
$oldforcelang = force_current_language($lang);
}
$parentlang = get_string_manager()->get_string('parentlanguage', 'langconfig', null, $lang);
$parentlang = get_string('parentlanguage', 'langconfig');
if ($parentlang === 'en') {
$parentlang = '';
}
// Let's hack around the current language.
if (!empty($lang)) {
force_current_language($oldforcelang);
}
return $parentlang;
}