The Locale service interface. This is a singleton object, and should be
obtained from the nsServiceManager.
Create a new nsILocale from a locale string.
aLocale | A locale code as described in nsILocale. |
A nsILocale representing the given locale. |
Get the user preference for locale from the operating system.
User's OS setting for preferred locale. |
Get the user preference for locale from the operating system.
NOTE: This has nothing to do with the locale used for localization of
the application (UI text strings etc.). This method returns something
similar to getSystemLocale.
User's OS setting for preferred locale. |
Get the most preferred locale from a list of locale preferences.
acceptLanguage | Locale preference in the same format as the Accept-Language HTTP header. |
The most preferred locale according to the acceptLanguage parameter. |
Get the user preference for locale from the operating system.
NOTE: This has nothing to do with any HTTP User-Agent. This method
returns the same as getSystemLocale, but as a string.
User's OS setting for preferred locale in the format described in nsILocale. |