summaryrefslogtreecommitdiff
path: root/roundcubemail/program/include
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-20 13:34:35 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-11-20 13:34:35 +0000
commit920b875f93a1474b76187fe538b17c092c599625 (patch)
tree7cc2d46a0aec8a74848572289b7af5f928baf63b /roundcubemail/program/include
parent5a2222a2b6ad2ec12d88670eace5f63b36f30539 (diff)
- Added TinyMCE localizations
git-svn-id: https://svn.roundcube.net/trunk@5455 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/include')
-rw-r--r--roundcubemail/program/include/main.inc13
1 files changed, 8 insertions, 5 deletions
diff --git a/roundcubemail/program/include/main.inc b/roundcubemail/program/include/main.inc
index c84e5ad6b..1868f42d2 100644
--- a/roundcubemail/program/include/main.inc
+++ b/roundcubemail/program/include/main.inc
@@ -1589,7 +1589,7 @@ function rcmail_display_server_error($fallback=null, $fallback_args=null)
*/
function rcube_html_editor($mode='')
{
- global $RCMAIL, $CONFIG;
+ global $RCMAIL;
$hook = $RCMAIL->plugins->exec_hook('html_editor', array('mode' => $mode));
@@ -1598,8 +1598,11 @@ function rcube_html_editor($mode='')
$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);
+ // TinyMCE uses two-letter lang codes, with exception of Chinese
+ if (strpos($lang, 'zh_') === 0)
+ $lang = str_replace('_', '-', $lang);
+ else
+ $lang = substr($lang, 0, 2);
if (!file_exists(INSTALL_PATH . 'program/js/tiny_mce/langs/'.$lang.'.js'))
$lang = 'en';
@@ -1611,8 +1614,8 @@ function rcube_html_editor($mode='')
'mode' => $mode,
'skin_path' => '$__skin_path',
'lang' => $lang,
- 'spellcheck' => intval($CONFIG['enable_spellcheck']),
- 'spelldict' => intval($CONFIG['spellcheck_dictionary']),
+ 'spellcheck' => intval($RCMAIL->config->get('enable_spellcheck')),
+ 'spelldict' => intval($RCMAIL->config->get('spellcheck_dictionary')),
))), 'foot');
}