CKEditor m.lang.contextmenu is undefined
I got the error "m.lang.contextmenu is undefined" while I was installing CKEditor on an ASP .Net website and trying to use a minimum setup.
I supposed the "ckeditor/lang/en.js" is enough, but, as pointed here, the editor doesn't download en.js by default, so it needs to be set on config.js
If this is not set, the editor is trying to load "the language that best fit the user language" using browser detection, so this can by any language (for sure, supported by CKEditor). That's why the editor could work with a browser, but not work with other browser, on the same machine.
I supposed the "ckeditor/lang/en.js" is enough, but, as pointed here, the editor doesn't download en.js by default, so it needs to be set on config.js
CKEDITOR.editorConfig = function (config) {
config.language = "en.js";
};
If this is not set, the editor is trying to load "the language that best fit the user language" using browser detection, so this can by any language (for sure, supported by CKEditor). That's why the editor could work with a browser, but not work with other browser, on the same machine.
the problem seems to be from the detectio mechanism
ReplyDeletetry to alert(CKEDITOR.lang.detect( 'en' ));
on my machine I got 'en-gb'..
if (CKEDITOR.lang.detect( 'en' ) == 'en-gb') {
config.language = 'en';
}
a more general thing would be to put 'en' instead of 'en-gb' or 'en-us' or other it there are..