Opened 18 years ago
Last modified 15 years ago
#1032 assigned New Feature
Possibility to override language entries from configuration
| Reported by: | Frederico Caldeira Knabben | Owned by: | |
|---|---|---|---|
| Priority: | Normal | Milestone: | |
| Component: | UI : Language | Version: | |
| Keywords: | Cc: |
Description
There should be a configuration entry to make it possible to override language file entries with custom texts. In this way it would be possible to set language entries from the server side (see #1014).
Attachments (2)
Change History (12)
comment:1 Changed 18 years ago by
| Keywords: | Confirmed added |
|---|---|
| Type: | Bug → Task |
comment:2 Changed 18 years ago by
| Type: | Task → New Feature |
|---|
Changed 17 years ago by
| Attachment: | 1032.patch added |
|---|
comment:3 Changed 17 years ago by
| Keywords: | Review? added |
|---|
comment:4 Changed 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|
The idea is quite good. The implementation instead needs some review.
- Please save "editor.config.lang" and "editor.config.lang[ entry ]" into local variables. Their references are being repeated many times.
- There is no need to make any check at line 155. Let's make it possible to extend the current lang in any case, even if the language entries are not available (it could be used for custom entries, for example).
- Also, "CKEDITOR.lang[ editor.langCode ]" is wrong. You should simply do "editor.lang".
- Our current language file take the entries from an object tree. So, it I want to override the table title string, I would do this:
lang :
{
table :
{
title : 'My Table Title'
}
}
... in this case, the entire editor.lang.table object will be replaced with the above one, loosing all other entries inside of it.
Changed 17 years ago by
| Attachment: | 1032_2.patch added |
|---|
comment:5 Changed 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|
comment:6 Changed 17 years ago by
| Owner: | set to Artur Formella |
|---|---|
| Status: | new → assigned |
comment:7 Changed 17 years ago by
| Milestone: | CKEditor 3.0 → CKEditor 3.x |
|---|
comment:8 Changed 16 years ago by
| Component: | General → UI : Language |
|---|---|
| Owner: | Artur Formella deleted |
| Status: | assigned → new |
comment:10 Changed 15 years ago by
| Status: | review → assigned |
|---|

Usage:
CKEDITOR.replace( 'editor1', { lang : { pl : { source : 'aaaa' }, en : { source : 'bbbb' }, source : 'cccc' } });Of course: CKEDITOR.lang.en.source = cccc