Ticket #5011 (closed Bug: wontfix)

Opened 5 years ago

Last modified 5 years ago

CKEditor should provide a common way to registry/config the lang file

Reported by: damo Owned by: garry.yao
Priority: Normal Milestone:
Component: General Version: SVN (CKEditor) - OLD
Keywords: IBM Confirmed Review- Cc: JoeK


CKEditor supports multiple languages. But all the language files are hardcode in lang.js. Consumer doesn't have a common way to registry/configure which we need to load or not. Especially when we want to add other language file, we have no way to add it except modifying the source code.

CKEditor should provide a config to let user add additional language file.


5011.patch (552 bytes) - added by garry.yao 5 years ago.

Change History

comment:1 Changed 5 years ago by fredck

  • Milestone changed from CKEditor 3.2 to CKEditor 3.3

In effect config.lang should simply be respected and enforced, even if the language is not one of the "registered" ones.

In any case, even now, it's possible to workaround this issue by simply registering custom languages after loading the editor core code. Just add the following script line:

// Register the "xy" language code.
CKEDITOR.lang.languages.xy = 1;

Changed 5 years ago by garry.yao

comment:2 Changed 5 years ago by garry.yao

  • Owner set to garry.yao
  • Status changed from new to assigned
  • Version set to SVN (CKEditor)
  • Keywords Confirmed Review? added

comment:3 Changed 5 years ago by alfonsoml

  • Keywords Review- added; Review? removed

With the patch, if someone sets the language to a code that doesn't have a matching file (for example using navigator.language in my localized version of Firefox returns es-ES, but the language file in CKEditor is just "es" for all Spanish locales), the editor won't load, so it will be too risky to leave it this way.

Is it really worth the future support requests or adding extra code to verify that the file has been loaded?

comment:4 Changed 5 years ago by fredck

  • Status changed from assigned to closed
  • Resolution set to wontfix
  • Milestone CKEditor 3.3 deleted

Alfonso's comments make a lot of sense. Considering that it's possible to have the desired results by registering the new languages, as exemplified in my previous comment, we don't really need to make changes here.

Note: See TracTickets for help on using tickets.
© 2003 – 2012 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy