summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-08-27 11:27:28 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2010-08-27 11:27:28 +0000
commit1c606f219f28a4f6c2d792e5391b1d39999bac63 (patch)
tree447bf7c3088a4cdc1bbf0a7dd2c7a4ac86a3d3d3
parent324af70a8a8ad42eba4b8af1fab47310ea88225a (diff)
- Fix TinyMCE uses zh_CN when zh_TW locale is set (#1486929)
git-svn-id: https://svn.roundcube.net/trunk@3910 208e9e7b-5314-0410-a742-e7e81cd9613c
-rw-r--r--roundcubemail/CHANGELOG1
-rw-r--r--roundcubemail/program/include/main.inc6
2 files changed, 6 insertions, 1 deletions
diff --git a/roundcubemail/CHANGELOG b/roundcubemail/CHANGELOG
index 83ad13f02..fbc3ee042 100644
--- a/roundcubemail/CHANGELOG
+++ b/roundcubemail/CHANGELOG
@@ -10,6 +10,7 @@ CHANGELOG RoundCube Webmail
- Fix SMTP test in Installer (#1486952)
- Fix "Select all" causes message to be opened in folder with exactly one message (#1486913)
- Fix Tab key doesn't work in HTML editor in Google Chrome (#1486925)
+- Fix TinyMCE uses zh_CN when zh_TW locale is set (#1486929)
RELEASE 0.4
-----------
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index f9ce5476e..fa5534f10 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/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';