From d7832871214c551bc0bc1e20c0e56bdb2226159f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E8=BF=9B?= Date: Sun, 16 Sep 2018 11:06:46 +0800 Subject: [PATCH] Update translate.js --- www/lib/js/translate.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/www/lib/js/translate.js b/www/lib/js/translate.js index 79eeda8..a244983 100644 --- a/www/lib/js/translate.js +++ b/www/lib/js/translate.js @@ -6,6 +6,9 @@ function translateWord(text, lang, dictionary) { lang = lang || systemLang; dictionary = dictionary || systemDictionary; + if (lang == 'zh-CN') lang='cn'; + + if (dictionary[text]) { var newText = dictionary[text][lang]; if (newText) {