From 5868bb1e8f9dd700e083bd758337378854aab79c Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Sun, 7 Oct 2007 23:48:05 +0000 Subject: [PATCH] GSOC #99 - Switch TinyMCE languages git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@43185 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CMSMain.php | 1 + code/GenericDataAdmin.php | 1 + code/NewsletterAdmin.php | 1 + code/ReportAdmin.php | 1 + javascript/tinymce.template.js | 1 + 5 files changed, 5 insertions(+) diff --git a/code/CMSMain.php b/code/CMSMain.php index a5e8c34f..58a3b612 100644 --- a/code/CMSMain.php +++ b/code/CMSMain.php @@ -29,6 +29,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr Requirements::javascriptTemplate("cms/javascript/tinymce.template.js", array( "ContentCSS" => (SSViewer::current_theme() ? "themes/" . SSViewer::current_theme() : project()) . "/css/editor.css", "BaseURL" => Director::absoluteBaseURL(), + "Lang" => i18n::get_tinymce_lang() )); } diff --git a/code/GenericDataAdmin.php b/code/GenericDataAdmin.php index ef5c151b..ef0962c0 100755 --- a/code/GenericDataAdmin.php +++ b/code/GenericDataAdmin.php @@ -83,6 +83,7 @@ abstract class GenericDataAdmin extends LeftAndMain { Requirements::javascriptTemplate("cms/javascript/tinymce.template.js", array( "ContentCSS" => project() . "/css/editor.css", "BaseURL" => Director::absoluteBaseURL(), + "Lang" => i18n::get_tinymce_lang() )); } diff --git a/code/NewsletterAdmin.php b/code/NewsletterAdmin.php index 98f07475..5a024d8e 100755 --- a/code/NewsletterAdmin.php +++ b/code/NewsletterAdmin.php @@ -43,6 +43,7 @@ class NewsletterAdmin extends LeftAndMain { Requirements::javascriptTemplate("cms/javascript/tinymce.template.js", array( "ContentCSS" => project() . "/css/editor.css", "BaseURL" => Director::absoluteBaseURL(), + "Lang" => i18n::get_tinymce_lang() )); } diff --git a/code/ReportAdmin.php b/code/ReportAdmin.php index 2a04f55a..7059b2f4 100755 --- a/code/ReportAdmin.php +++ b/code/ReportAdmin.php @@ -45,6 +45,7 @@ class ReportAdmin extends LeftAndMain { Requirements::javascriptTemplate("cms/javascript/tinymce.template.js", array( "ContentCSS" => project() . "/css/editor.css", "BaseURL" => Director::absoluteBaseURL(), + "Lang" => i18n::get_tinymce_lang() )); } } diff --git a/javascript/tinymce.template.js b/javascript/tinymce.template.js index edff6781..8aaa3bb1 100755 --- a/javascript/tinymce.template.js +++ b/javascript/tinymce.template.js @@ -10,6 +10,7 @@ function nullConverter(url) { if((typeof tinyMCE != 'undefined')) { tinyMCE.init({ mode : "specific_textareas", + language: "$Lang", textarea_trigger : "tinymce", width: -1, height: -1,