Commit c249c548 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Set the language of the WYSIWYG editor correctly, to support translations

parent 8c1e5567
......@@ -665,12 +665,14 @@ EOF;
// the execcommand_callback.
$content_css = json_encode(theme_get_url('style/tinymce.css'));
$language = substr(get_config('lang'), 0, 2);
$tinymceinit = <<<EOF
<script type="text/javascript">
tinyMCE.init({
mode: "textareas",
editor_selector: 'wysiwyg',
button_tile_map: true,
language: '{$language}',
theme: "advanced",
plugins: "table,emotions,iespell,inlinepopups",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,forecolor,backcolor,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,hr,emotions,iespell,cleanup,separator,link,unlink,image,separator,code",
......
......@@ -79,12 +79,14 @@ function &smarty($javascript = array(), $headers = array(), $pagestrings = array
}
else {
$content_css = json_encode(theme_get_url('style/tinymce.css'));
$language = substr(get_config('lang'), 0, 2);
$headers[] = <<<EOF
<script type="text/javascript">
tinyMCE.init({
mode: "textareas",
editor_selector: 'wysiwyg',
button_tile_map: true,
language: '{$language}',
theme: "advanced",
plugins: "table,emotions,iespell,inlinepopups,paste",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,separator,forecolor,backcolor,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,hr,emotions,iespell,cleanup,separator,link,unlink,separator,code",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment