A heads up for everyone who's upgraded to the latest and greatest firefox that just came out... It apparently breaks FCKEditor 2.0 Beta 2.
Apparently Firefox's "navigator.language" call returns an empty object by default (not a string for the language "en") This might be a bug (seems like it) of the newer Gecko engine release used by Firefox PR1, but for now, to fix it I changed the following code in internals/fcklanguagemanager.js.
Change the line:
var sUserLang = navigator.language ? navigator.language.toLowerCase() : navigator.userLanguage.toLowerCase() ;
to
var sUserLang = navigator.language ? navigator.language : navigator.userLanguage ;
// Firefox PR1 (gecko) has NO default language as the default. We'll set it to English.
if (sUserLang) {
sUserLang = sUserLang.toLowerCase();
}
else {
sUserLang = "en";
}
That should make everything work like normal again until this bug is fixed in Firefox PR1.
Apparently Firefox's "navigator.language" call returns an empty object by default (not a string for the language "en") This might be a bug (seems like it) of the newer Gecko engine release used by Firefox PR1, but for now, to fix it I changed the following code in internals/fcklanguagemanager.js.
Change the line:
var sUserLang = navigator.language ? navigator.language.toLowerCase() : navigator.userLanguage.toLowerCase() ;
to
var sUserLang = navigator.language ? navigator.language : navigator.userLanguage ;
// Firefox PR1 (gecko) has NO default language as the default. We'll set it to English.
if (sUserLang) {
sUserLang = sUserLang.toLowerCase();
}
else {
sUserLang = "en";
}
That should make everything work like normal again until this bug is fixed in Firefox PR1.
RE: Firefox PR1 problem (and resolution)
this "workaround" is not working for me, i still get these two errors:
Error: navigator.userLanguage has no properties
Source File: http://localhost/espace/libs/FCKeditor/ ... gecko_1.js
Line: 16
Error: FCKLang is not defined
Source File: http://localhost/espace/libs/FCKeditor/ ... startup.js
Line: 16
what am i doing wrong?
greetings, matthew
RE: Firefox PR1 problem (and resolution)
I have not tested it but I think you could also disable FCKConfig.AutoDetectLanguage and set FCKConfig.DefaultLanguage to make things work.
Piebe
RE: Firefox PR1 problem (and resolution)
thx, it nearly works.
i disabled FCKConfig.AutoDetectLanguage and set FCKConfig.DefaultLanguage to "en". now i can see and edit the text, but there is no menubar.
and there is a new error message:
Error: FCKConfig.FontColors has no properties
Source File: http://localhost/espace/libs/FCKeditor/ ... gecko_2.js
Line: 21
RE: Firefox PR1 problem (and resolution)
I tried to execute this code:
<script>
var sLang = navigator.language;
document.write("navigator.language =" + sLang);
</script>
and with FireFox 1.0PR it displays:
navigator.language =
while with Firefox 0.9:
navigator.language =en-US
So I posted the bug to Bugzilla: [Bug 259536]
http://bugzilla.mozilla.org/show_bug.cgi?id=259536
RE: Firefox PR1 problem (and resolution)
Please: vote for the bug
http://bugzilla.mozilla.org/show_bug.cgi?id=259536
RE: Firefox PR1 problem (and resolution)
Simone