From 1fb718cae02c6929c1b31562f05eddc32ae3be17 Mon Sep 17 00:00:00 2001 From: alecpl Date: Fri, 27 Aug 2010 11:27:28 +0000 Subject: - Fix TinyMCE uses zh_CN when zh_TW locale is set (#1486929) --- program/include/main.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'program/include') 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'; -- cgit v1.2.3