Opened 6 years ago

Closed 5 years ago

#5011 closed Bug (wontfix)

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

Description

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.

Attachments (1)

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

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 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 6 years ago by garry.yao

comment:2 Changed 6 years ago by garry.yao

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

comment:3 Changed 6 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

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

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 – 2015 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy