Reputation: 13511
I have create a plugin for tinyMCE and It does not load the language file.
The plugin folder stracture is that:
/content_columns/
/content_columns/content_columns
/content_columns/langs/
/content_columns/langs/el.js
My plugin code is that:
(
function()
{
tinyMCE.PluginManager.requireLangPack('content_columns');
tinyMCE.create(
'tinymce.plugins.ContentColumns',
{
init: function(ed, url)
{
ed.onNodeChange.add(
function(ed, cm, n)
{
cm.setActive('content_columns', n.nodeName = 'IMG');
}
);
},
createControl: function(n, cm)
{
switch(n)
{
case 'content_columns':
var mlb = cm.createListBox(
'content_columns',
{
title : 'content_columns.title',
onselect : function(v)
{}
}
);
mlb.add('One half', 'one_half');
return mlb;
}
return null;
}
}
);
tinymce.PluginManager.add('content_columns', tinymce.plugins.ContentColumns);
}
)();
and my el.js file is that:
tinyMCE.addI18n(
'el.content_columns',
{
title: "Test Title"
}
);
While the plugin is working good, I can't load the language file. Any idea why I can't load it ?
Upvotes: 1
Views: 835
Reputation: 50832
What you did seems to be fine. I think it might be a problem that you are using a "_"
in your pluginname. What happens if you remove that character from the name (and the corresponding lines in your langauge file and plugin?)
Upvotes: 1