mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-22015 fixed more string_manager encapsulation issues - string format conversion scripts
This commit is contained in:
parent
96de38c3ab
commit
15a17d3504
@ -32,11 +32,7 @@ require_once('../../../../config.php');
|
||||
$lang = optional_param('elanguage', 'en', PARAM_SAFEDIR);
|
||||
$theme = optional_param('etheme', 'advanced', PARAM_SAFEDIR);
|
||||
|
||||
if ($lang === 'en') {
|
||||
//ok
|
||||
} else if (file_exists($CFG->langotherroot .'/'. $lang)) {
|
||||
//$lang = $lang;
|
||||
} else {
|
||||
if (!get_string_manager()->translation_exists($lang, false)) {
|
||||
$lang = 'en';
|
||||
}
|
||||
|
||||
|
@ -6,11 +6,10 @@ require("../../../../../config.php");
|
||||
|
||||
$lang = required_param('elanguage', PARAM_SAFEDIR);
|
||||
|
||||
if (file_exists("$CFG->dataroot/lang/$lang") or file_exists("$CFG->dirroot/lang/$lang")) {
|
||||
$SESSION->lang = $lang;
|
||||
} else if (file_exists("$CFG->dataroot/lang/{$lang}") or file_exists("$CFG->dirroot/lang/{$lang}")) {
|
||||
$SESSION->lang = $lang;
|
||||
if (!get_string_manager()->translation_exists($lang, false)) {
|
||||
$lang = 'en';
|
||||
}
|
||||
$SESSION->lang = $lang;
|
||||
|
||||
$langmapping = array('cs'=>'cz', 'pt_br'=>'pt-br');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user