diff --git a/administrator/language/en-GB/plg_editors_tinymce.ini b/administrator/language/en-GB/plg_editors_tinymce.ini
index 5eaba7a58db27..77fbe5aaa1904 100644
--- a/administrator/language/en-GB/plg_editors_tinymce.ini
+++ b/administrator/language/en-GB/plg_editors_tinymce.ini
@@ -17,16 +17,20 @@ PLG_TINY_ERR_EDITORCSSFILENOTPRESENT="Could not find the file 'editor.css' in th
PLG_TINY_ERR_UNSUPPORTEDBROWSER="Drag and drop image upload is not available for your browser. Please consider using a fully HTML5 compatible browser."
PLG_TINY_FIELD_ADVIMAGE_LABEL="Advanced Image"
PLG_TINY_FIELD_ADVLIST_LABEL="Advanced List"
+PLG_TINY_FIELD_CONTENTCODE_LABEL="Language Code"
+PLG_TINY_FIELD_CONTENTLANGS_DESC="Language of parts allows you to mark a word or phrase as a different language. To create the list of languages you need to enter a language name and a language code. This code can be just for the language eg: de or can include the region eg de-AT."
+PLG_TINY_FIELD_CONTENTLANGS_LABEL="Language of Parts"
+PLG_TINY_FIELD_CONTENTLANGUAGE_LABEL="Language Name"
PLG_TINY_FIELD_CONTEXTMENU_LABEL="Context Menu"
PLG_TINY_FIELD_CSS_DESC="By default the Plugin looks for an editor.css file. If it can't find one in the default template CSS folder, it loads the editor.css file from the system template."
PLG_TINY_FIELD_CSS_LABEL="Template CSS Classes"
+PLG_TINY_FIELD_CUSTOMBUTTON_LABEL="Custom Button"
+PLG_TINY_FIELD_CUSTOMPLUGIN_LABEL="Custom Plugin"
PLG_TINY_FIELD_CUSTOM_CONTENT_TEMPLATE_PATH_DESC="A directory named \"tinymce\" in your site template."
PLG_TINY_FIELD_CUSTOM_CONTENT_TEMPLATE_PATH_LABEL="Content Template Directory"
PLG_TINY_FIELD_CUSTOM_CSS_DESC="Optional CSS file that will override the standard editor.css file. Enter a file name to point to a file in the CSS folder of the default template (for example, templates/cassiopeia/css/). Or enter a full URL path to the custom CSS file. If you enter a value in this field, this file will be used instead of the editor.css file."
PLG_TINY_FIELD_CUSTOM_CSS_LABEL="Custom CSS Classes"
PLG_TINY_FIELD_CUSTOM_PATH_LABEL="Images Directory"
-PLG_TINY_FIELD_CUSTOMBUTTON_LABEL="Custom Button"
-PLG_TINY_FIELD_CUSTOMPLUGIN_LABEL="Custom Plugin"
PLG_TINY_FIELD_DIRECTION_LABEL="Text Direction"
PLG_TINY_FIELD_DRAG_DROP_LABEL="Images Drag and Drop"
PLG_TINY_FIELD_ELEMENTS_LABEL="Extended Valid Elements"
diff --git a/build/media_source/plg_editors_tinymce/js/tinymce-builder.es6.js b/build/media_source/plg_editors_tinymce/js/tinymce-builder.es6.js
index 1c36d1b2e5d06..847bcd89b900d 100644
--- a/build/media_source/plg_editors_tinymce/js/tinymce-builder.es6.js
+++ b/build/media_source/plg_editors_tinymce/js/tinymce-builder.es6.js
@@ -75,6 +75,7 @@ const tinymce = {
'insert-time': '',
invert: '',
italic: '',
+ language: '',
line: '',
lineheight: '',
link: '',
diff --git a/plugins/editors/tinymce/forms/setoptions.xml b/plugins/editors/tinymce/forms/setoptions.xml
index 272310df24130..3500ce0218347 100644
--- a/plugins/editors/tinymce/forms/setoptions.xml
+++ b/plugins/editors/tinymce/forms/setoptions.xml
@@ -298,6 +298,35 @@
+
+
+
+
content_languages) && $extraOptions->content_languages)
+ {
+ foreach (json_decode(json_encode($extraOptions->content_languages), true) as $content_language)
+ {
+ // if we have a language name and a language code then add to the menu
+ if ($content_language['content_language_name'] != '' && $content_language['content_language_code'] != '')
+ {
+ $ctemp[] = array('title' => $content_language['content_language_name'], 'code' => $content_language['content_language_code']);
+ }
+ }
+ $scriptOptions['content_langs'] = array_merge($ctemp);
+ }
+
// User custom plugins and buttons
$custom_plugin = trim($levelParams->get('custom_plugin', ''));
$custom_button = trim($levelParams->get('custom_button', ''));
@@ -998,6 +1012,8 @@ public static function getKnownButtons()
'pastetext' => array('label' => 'Paste as text', 'plugin' => 'paste'),
'removeformat' => array('label' => 'Clear formatting'),
+ 'language' => array('label' => 'Language'),
+
// Buttons from the plugins
'anchor' => array('label' => 'Anchor', 'plugin' => 'anchor'),
'hr' => array('label' => 'Horizontal line', 'plugin' => 'hr'),
@@ -1088,6 +1104,7 @@ public static function getToolbarPreset()
'cut', 'copy', 'paste', 'pastetext', '|',
'visualchars', 'visualblocks', 'nonbreaking', 'blockquote', 'template', '|',
'print', 'preview', 'codesample', 'insertdatetime', 'removeformat', 'jxtdbuttons',
+ 'language',
),
'toolbar2' => array(),
);
diff --git a/templates/cassiopeia/scss/editor.scss b/templates/cassiopeia/scss/editor.scss
index 64b3cd71aea8f..fdc549a87ee58 100644
--- a/templates/cassiopeia/scss/editor.scss
+++ b/templates/cassiopeia/scss/editor.scss
@@ -60,3 +60,13 @@ hr#system-readmore {
border: #f00 dashed 1px;
}
+span[lang] {
+ padding: 2px;
+ border: 1px dashed #bbb;
+ &:after {
+ font-size: smaller;
+ color: #f00;
+ vertical-align: super;
+ content: attr(lang);
+ }
+}
diff --git a/templates/system/scss/editor.scss b/templates/system/scss/editor.scss
index 4a54973fec2ca..3a78d15283242 100644
--- a/templates/system/scss/editor.scss
+++ b/templates/system/scss/editor.scss
@@ -63,3 +63,14 @@ hr.system-pagebreak {
color: #808080;
border: #808080 dashed 1px;
}
+
+span[lang] {
+ padding: 2px;
+ border: 1px dashed #bbb;
+ &:after {
+ font-size: smaller;
+ color: #f00;
+ vertical-align: super;
+ content: attr(lang);
+ }
+}