summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2010-08-27 11:27:28 +0000
committeralecpl <alec@alec.pl>2010-08-27 11:27:28 +0000
commit1fb718cae02c6929c1b31562f05eddc32ae3be17 (patch)
tree5d53bb1c792cdca8c7218a7e470fa79ccb3eb536 /program
parenteeb34ba3566ea824c45b918268f57e6c97d60081 (diff)
- Fix TinyMCE uses zh_CN when zh_TW locale is set (#1486929)
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc6
1 files changed, 5 insertions, 1 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index f9ce5476e..fa5534f10 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -1505,7 +1505,11 @@ function rcube_html_editor($mode='')
if ($hook['abort'])
return;
- $lang = strtolower(substr($_SESSION['language'], 0, 2));
+ $lang = strtolower($_SESSION['language']);
+
+ // TinyMCE uses 'tw' for zh_TW (which is wrong, because tw is a code of Twi language)
+ $lang = ($lang == 'zh_tw') ? 'tw' : substr($lang, 0, 2);
+
if (!file_exists(INSTALL_PATH . 'program/js/tiny_mce/langs/'.$lang.'.js'))
$lang = 'en';