From e01b5c0e77e2a1a574e1e0699594e7fcc23e0d0b Mon Sep 17 00:00:00 2001 From: moodler Date: Sun, 19 Jan 2003 05:25:31 +0000 Subject: [PATCH] Small fix to make this script more usable on Multi-Byte languages like zh_hk --- admin/lang.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/admin/lang.php b/admin/lang.php index a068b19b3cf..ac63641c923 100644 --- a/admin/lang.php +++ b/admin/lang.php @@ -95,7 +95,7 @@ $first = false; $somethingfound = true; } - echo "$"."string[$key] = \"$value\";
"; + echo "$"."string['$key'] = \"$value\";
"; } } } @@ -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