diff options
-rw-r--r-- | program/steps/settings/edit_identity.inc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/program/steps/settings/edit_identity.inc b/program/steps/settings/edit_identity.inc index d8802ca8c..37fbbcaff 100644 --- a/program/steps/settings/edit_identity.inc +++ b/program/steps/settings/edit_identity.inc @@ -39,10 +39,17 @@ function rcube_identity_form($attrib) { global $IDENTITY_RECORD, $OUTPUT; - $OUTPUT->include_script('tiny_mce/tiny_mce_src.js'); + $tinylang = substr($_SESSION['user_lang'], 0, 2); + if (!file_exists('program/js/tiny_mce/langs/'.$tinylang.'.js')) + { + $tinylang = 'en'; + } + + $OUTPUT->include_script('tiny_mce/tiny_mce.js'); $OUTPUT->add_script("tinyMCE.init({ mode : 'textareas'," . "editor_selector : 'mce_editor'," . "apply_source_formatting : true," . + "language : '$tinylang'," . "content_css : '\$__skin_path' + '/editor_content.css'," . "theme : 'advanced'," . "theme_advanced_toolbar_location : 'top'," . |