Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Localization for custom TinyMCE ssmacron module

  • Loading branch information...
commit 857afc4ee77adf794a58cd2d2da224b9c5e6eedd 1 parent 94b739e
Ingo Schommer chillu authored
9 thirdparty/tinymce_ssmacron/editor_plugin_src.js
View
@@ -1,6 +1,13 @@
(function() {
var each = tinymce.each;
+ // TinyMCE will stop loading if it encounters non-existent external script file
+ // when included through tiny_mce_gzip.php. Only load the external lang package if it is available.
+ var availableLangs = ['en', 'mi_NZ'];
+ if(jQuery.inArray(tinymce.settings.language, availableLangs) != -1) {
+ tinymce.PluginManager.requireLangPack("ssmacron");
+ }
+
/**
* Load via:
* HtmlEditorConfig::get('cms')->enablePlugins(array('ssmacron', '../tinymce_ssmacron'))
@@ -33,7 +40,7 @@
// Register buttons
ed.addButton('ssmacron', {
- title : 'Insert a Macron',
+ title : t.editor.translate('insertmacron'),
cmd : 'mceInsertMacron',
image : url + '/img/macron.png'
});
1  thirdparty/tinymce_ssmacron/lang/en.js
View
@@ -0,0 +1 @@
+tinyMCE.addI18n('en.ssmacron',{'insertmacron': 'Insert a Macron'});
1  thirdparty/tinymce_ssmacron/lang/mi_NZ.js
View
@@ -0,0 +1 @@
+tinyMCE.addI18n('mi_NZ.ssmacron',{'insertmacron': 'T\u0101urua he tohut\u014D'});
Please sign in to comment.
Something went wrong with that request. Please try again.