How to change the language of FCKeditor?

Questions about how to use the online - editors and suggestions how to improve them
svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

How to change the language of FCKeditor?

Post by svasti » Thu Nov 25, 2010 3:51 pm

Hallo the experts,

having made a CMSimple website for somebody in Holland I discoverd to my dismay, that FCKeditor stubbornly kept its German hints and discriptions. Well, I ended up renaming the FCKeditor/editor/lang/nl.js file to "de.js".

Does anybody know a more elegant method? Even in CMSimple 1.3 FCKeditor is German only.
Changing FCKConfig.DefaultLanguage infckconfig_cmsimple.js seems to have no effect.

svasti

Tata
Posts: 3601
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: How to change the language of FCKeditor?

Post by Tata » Thu Nov 25, 2010 4:39 pm

I have just tested following:
1. Using TotalCommander - search for all files within FCKeditor folder containing string 'en' (in my installation EN was the default language for FCKeditor)
2. Using Notepad++ opened all files found
- CMSimple13\FCKeditor\custom_configurations\fckconfig_cmsimple.js
- CMSimple13\FCKeditor\editor\js\fckeditorcode_gecko.js
- CMSimple13\FCKeditor\editor\js\fckeditorcode_ie.js
- CMSimple13\FCKeditor\fckconfig.js
3. Used search/replace 'en' to 'sk' in all opened files

Now, the editor speaks to me in Slovak.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: How to change the language of FCKeditor?

Post by svasti » Thu Nov 25, 2010 6:53 pm

In the first place, what magic did you do to you get EN as default language? I downloaded the 1.3 version and found FCKeditor to be in German. Why? Looking for "en" in the files you mentioned gave:

- CMSimple13\FCKeditor\custom_configurations\fckconfig_cmsimple.js and - CMSimple13\FCKeditor\fckconfig.js

FCKConfig.AutoDetectLanguage = true ;
FCKConfig.DefaultLanguage = 'en' ;


- CMSimple13\FCKeditor\editor\js\fckeditorcode_gecko.js and - CMSimple13\FCKeditor\editor\js\fckeditorcode_ie.js

this.DefaultLanguage=FCKConfig.DefaultLanguage;else this.DefaultLanguage='en';

looking vor "de" gave nearly nothing, except in fckconfig_cmsimple.js
FCKConfig.Plugins.Add('nbsp','de,en');
FCKConfig.Plugins.Add('sitelink','de,en');
well, this seems to be only for the language of the plugin dialogues.

looking for "de" in all files of FCKeditor didn't give me any futher enlightenment. (Using PSPad, which does search/replace in multiple files).

puzzled
svasti

Tata
Posts: 3601
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: How to change the language of FCKeditor?

Post by Tata » Thu Nov 25, 2010 7:14 pm

It is funny, but I made a new installatio right now and without changing anything, the Editor is showing all labels, tooltips etc. in Slovak.
Eventhough there is set:
FCKConfig.DefaultLanguage = 'en' ; in fcconfig.js
FCKConfig.Plugins.Add('flvPlayer','en'); in fcconfig_cmsimple.js
FCKConfig.DefaultLanguage = 'en' ; in fcconfig_cmsimple.js
...else this.DefaultLanguage= 'en'... in fckeditorcode_gecko.js
...else this.DefaultLanguage= 'en'... in fckeditorcode_ie.js

Check your PC setting. What is your OS default language?
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: How to change the language of FCKeditor?

Post by svasti » Thu Nov 25, 2010 8:07 pm

Strange indeed. My OS is Win xp German, and I just played around with every conceivable language setting, but couldn't make FCKeditor change its language.

But I found a solution:
in fckconfig_cmsimple.js
FCKConfig.AutoDetectLanguage = false ;
FCKConfig.DefaultLanguage = 'en' ;

Now FCKeditor is in English. Wow!

And now with FCKConfig.DefaultLanguage = 'sk' ; FCKeditor is in Slovak. Wow, nice language. Only problem, I don't understand anything.

svasti

Tata
Posts: 3601
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: How to change the language of FCKeditor?

Post by Tata » Thu Nov 25, 2010 8:37 pm

Thak you, too. Now I have learned something as well. You see, a little more dingging helps a lot.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

andrewed
Posts: 1
Joined: Wed Aug 17, 2011 11:01 am

Re: How to change the language of FCKeditor?

Post by andrewed » Wed Aug 17, 2011 11:14 am

svasti,

This worked for me, too. Thank you!

For others, find the offending file,
fckconfig_cmsimple.js
here:
(your CMSimple folder)\FCKeditor\custom_configurations

By the way, a change in the same setting in
(your CMSimple folder)\FCKeditor\fckconfig.js
seems to make no difference whether set to true or false.

As a traveler who uses others' computers, I wish I had a magic wand that undid Language Autodetect settings in all programs everywhere.

Andrew

cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: How to change the language of FCKeditor?

Post by cmb » Wed Aug 17, 2011 3:37 pm

Hello Frank, hello Andrew,

thanks for pointing this out! :) But I've wondered, if it is possible to avoid hardcoding the language of FCKeditor, but to choose it dynamically for the current language for multilanguage websites. And I've just found out how:

In FCKeditor/custum_configurations/fckconfig_cmsimple.js change

Code: Select all

FCKConfig.AutoDetectLanguage	= false ;
as done before, and in cmsimple/fckeditor.php add

Code: Select all


oFCKeditor.Config["DefaultLanguage"] = \''.$sl.'\';
to the JS function init()

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1660
Joined: Wed Dec 17, 2008 5:08 pm

Re: How to change the language of FCKeditor?

Post by svasti » Wed Aug 17, 2011 6:53 pm

Argh!
Now that FCKeditor is on its way out, we find all these wonderful settings.

Christoph, really a very ingenious idea. Works very nicely on my test-website with 4 languages.
Hopefully these settings can be use in Holger's coming CKeditor.
svasti

cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: How to change the language of FCKeditor?

Post by cmb » Wed Aug 17, 2011 7:13 pm

Hello Frank,
svasti wrote: Argh!
Now that FCKeditor is on its way out, we find all these wonderful settings.
Indeed! :evil:

But I'm quite sure that it's possible with CKeditor too, as it's just FCKeditors next version.

Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply