Page 1 of 2

How to change the language of FCKeditor?

Posted: Thu Nov 25, 2010 3:51 pm
by svasti
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

Re: How to change the language of FCKeditor?

Posted: Thu Nov 25, 2010 4:39 pm
by Tata
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.

Re: How to change the language of FCKeditor?

Posted: Thu Nov 25, 2010 6:53 pm
by svasti
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

Re: How to change the language of FCKeditor?

Posted: Thu Nov 25, 2010 7:14 pm
by Tata
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?

Re: How to change the language of FCKeditor?

Posted: Thu Nov 25, 2010 8:07 pm
by svasti
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

Re: How to change the language of FCKeditor?

Posted: Thu Nov 25, 2010 8:37 pm
by Tata
Thak you, too. Now I have learned something as well. You see, a little more dingging helps a lot.

Re: How to change the language of FCKeditor?

Posted: Wed Aug 17, 2011 11:14 am
by andrewed
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

Re: How to change the language of FCKeditor?

Posted: Wed Aug 17, 2011 3:37 pm
by cmb
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

Re: How to change the language of FCKeditor?

Posted: Wed Aug 17, 2011 6:53 pm
by svasti
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

Re: How to change the language of FCKeditor?

Posted: Wed Aug 17, 2011 7:13 pm
by cmb
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