I still have problems with setting the general.useragent.locale on windows.
There are no problems with displaying content from the selected locale, the
problems I am running into are with how the general.useragent.locale
preference item is set.
We are using the binary distribution of XUL Runner 1.8.0.4 as the runtime.
Doing a search through the JS files in the XUL Runner package, there are 2
files that are declaring this preference:
Xulrunner/greprefs/all.js:
pref("general.useragent.locale",
"chrome://navigator/locale/navigator.properties");
and xulrunner/defaults/prefs/xulrunner.js
(with some interesting comments preceeding the declaration, included here)
// We need to override the default values of these preferences since all.js
// assumes these are in the navigator package, which for us is non-existant.
// XXX(darin): perhaps all.js should not be seamonkey specific
pref("general.useragent.locale", "en-US");
I also set general.useragent.locale in the app specific prefs.js file
(/my-app/defaults/preferences/prefs.js)
I expected atleast one of the following to work (in order):
1. Any preference in the app specific prefs.js should override preferences
set anywhere else.
2. If I comment out the general.useragent.locale setting in the above 2
XulRunner location then it should pick the value set for this preference in
the app specific prefs.js
Neither of this two happen, the general.useragent.locale preference is
ALWAYS read from all.js followed by xulrunner.js and the value set in the
app specific prefs.js is ALWAYS ignored.
The work around for me to get localization to respect the selected locale is
to change the preference in xulrunner.js.
Is this a bug or am I doing something wrong here?
-Sandip
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sandip Ghosh
Sent: Thursday, March 01, 2007 2:23 PM
To: 'Axel Hecht'; [EMAIL PROTECTED]
Subject: RE: Localization on Windows
Thanks for your response, yes it works for me on Windows now.
It turns I had to install the Asian language Pack for the O.S. I also
selected Japanese as the language for the "Regional Options" and "Advanced"
tabs of the windows "Regional and Language Options" dialog.
Not sure if all of this is required, but until I had the language pack
installed and these options set, XULRunner was not respecting the
general.useragent.locale setting to anything other than "en-US".
-Sandip
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Axel Hecht
Sent: Thursday, March 01, 2007 1:30 AM
To: [EMAIL PROTECTED]
Subject: Re: Localization on Windows
Sandip Ghosh wrote:
> We have a cross platform localized XUL application. All UI strings are
> defined as entities in XUL and properties in JS and the manifest points to
> the locale folder where the DTD and property files are located. Then in
> /defaults/preferences/prefs.js I have declared the preference item:
> pref("general.useragent.locale", "ja-JP"); for e.g. to select the Japanese
> locale.
>
>
>
> This works perfectly on linux, but not on windows. Is there something else
> that is needed to make localization for a XUL app work on windows ?
No. I would expect some installation problem.
> I followed the following comments in the xulplanet.com page on
localization
> and tried with the "Unired" text editor and selected UTF-8 character set.
> That made no difference.
>
>
>
> Yes,DTD file must be UTF-8 encoding. But UTF-8 not only ONE UTF-8! it also
> have UTF8(BOM).So i suggest a great tool to select right encoding under
> Windows: UniRed, You must use File->Properties->Charset[UTF-8] and Unicode
> representation[&#DDDD;] to selected!! ]
I never understood the rationale for having a byte order mark in a
single byte encoding.
Axel
_______________________________________________
dev-tech-xul mailing list
[EMAIL PROTECTED]
https://lists.mozilla.org/listinfo/dev-tech-xul
_______________________________________________
dev-tech-xul mailing list
[EMAIL PROTECTED]
https://lists.mozilla.org/listinfo/dev-tech-xul
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom