[Project_owners] Localization

David Murray lid2000 at tpg.com.au
Fri Nov 7 21:04:37 EST 2003


Wouldn't just a simple navigator.language work?

ie. alert(navigator.language);


Biju G C wrote:

> --- "Laeb (hotmail)" <laebcontact at hotmail.com> wrote: 
>  
>
>>Thank you Biju G C !
>>    
>>
>
>no probs.
>
>  
>
>>Do you know if this is the right way to get the UI language ?
>>    
>>
>
>I also dont know :(
>Somebody else may be able to comment on this.
>
>FYI: 
>After I saw your mail, thought it will be useful 
>to all, so i googled.
>and got GetCategory( "NSILOCALE_MESSAGES" ) function.
>
>  
>
>>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
>>_______________________________________________
>>Project_owners mailing list
>>Project_owners at mozdev.org
>>http://mozdev.org/mailman/listinfo/project_owners 
>>    
>>
>
>________________________________________________________________________
>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