Opened 14 years ago

Closed 14 years ago

#5011 closed Bug (wontfix)

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

Reported by: Damian Owned by: Garry Yao
Priority: Normal Milestone:
Component: General Version: SVN (CKEditor) - OLD
Keywords: IBM Confirmed Review- Cc: Joe Kavanagh


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 14 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.2CKEditor 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 14 years ago by Garry Yao

Attachment: 5011.patch added

comment:2 Changed 14 years ago by Garry Yao

Keywords: Confirmed Review? added
Owner: set to Garry Yao
Status: newassigned
Version: SVN (CKEditor)

comment:3 Changed 14 years ago by Alfonso Martínez de Lizarrondo

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 14 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.3
Resolution: wontfix
Status: assignedclosed

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 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy