mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Small fix to make this script more usable on Multi-Byte languages like zh_hk
This commit is contained in:
parent
b5fdd4c60a
commit
e01b5c0e77
@ -95,7 +95,7 @@
|
||||
$first = false;
|
||||
$somethingfound = true;
|
||||
}
|
||||
echo "$"."string[$key] = \"$value\";<BR>";
|
||||
echo "$"."string['$key'] = \"$value\";<BR>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -261,7 +261,9 @@ function lang_save_file($path, $file, $strings) {
|
||||
|
||||
foreach ($strings as $key => $value) {
|
||||
list($id, $stringname) = explode("-",$key);
|
||||
$value = str_replace("\\","",$value); // Delete all slashes
|
||||
if ($CFG->lang != "zh_hk") { // Some MB languages include backslash bytes
|
||||
$value = str_replace("\\","",$value); // Delete all slashes
|
||||
}
|
||||
$value = str_replace("$"."a", "\\$"."a", $value); // Add slashes for $a
|
||||
$value = str_replace("\"", "\\\"", $value); // Add slashes for "
|
||||
$value = str_replace("%","%%",$value); // Escape % characters
|
||||
|
Loading…
x
Reference in New Issue
Block a user