[Project_owners] Localization

Laeb (hotmail) laebcontact at hotmail.com
Mon Nov 3 23:08:47 EST 2003


Thank you Biju G C !

Do you know if this is the right way to get the UI language ?
Because this didn't give me the expected result (en-US) but another language
code.

----- Original Message ----- 
From: Biju G C
To: Mozdev Project Owners List
Sent: Monday, November 03, 2003 9:54 PM
Subject: Re: [Project_owners] Localization


--- "Laeb (hotmail)" <laebcontact at hotmail.com> wrote:
>
> var localeService = Components.classes[
>
"@mozilla.org/intl/nslocaleservice;1"].getServiceComponents.interfaces.nsILo
> caleService);
> var locale=localeService.GetApplicationLocale();
>

try
var locale  = Components.classes["@mozilla.org/intl/nslocaleservice;1"]
         .getService( Components.interfaces.nsILocaleService )
         .GetApplicationLocale()
         .GetCategory( "NSILOCALE_MESSAGES" );

alert( locale );


you were missing "(" in getServiceComponents
and "GetCategory()"

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk
_______________________________________________
Project_owners mailing list
Project_owners at mozdev.org
http://mozdev.org/mailman/listinfo/project_owners


More information about the Project_owners mailing list