nsISupports
Last changed in Gecko 1.9 (Firefox 3)Implemented by: @mozilla.org/intl/nslocaleservice;1
. To use this service, use:
var localeService = Components.classes["@mozilla.org/intl/nslocaleservice;1"] .getService(Components.interfaces.nsILocaleService);
nsILocale getApplicationLocale(); |
AString getLocaleComponentForUserAgent(); |
nsILocale getLocaleFromAcceptLanguage(in string acceptLanguage); |
nsILocale getSystemLocale(); |
nsILocale newLocale(in AString aLocale); |
nsILocale newLocaleObject(in nsILocaleDefinition localeDefinition); Obsolete since Gecko 1.9 |
Gets the user preference for locale from the operating system.
getSystemLocale
.nsILocale getApplicationLocale();
None.
The user's OS setting for preferred locale.
Gets the user preference for locale from the operating system.
AString getLocaleComponentForUserAgent();
None.
The user's OS setting for preferred locale in the format described in nsILocale
.
Gets the most preferred locale from a list of locale preferences.
nsILocale getLocaleFromAcceptLanguage( in string acceptLanguage );
acceptLanguage
The most preferred locale according to the acceptLanguage
parameter.
Gets the user preference for locale from the operating system.
nsILocale getSystemLocale();
None.
The user's OS setting for preferred locale.
Create a new nsILocale
from a locale string.
nsILocale newLocale( in AString aLocale );
aLocale
nsILocale
.A nsILocale
representing the given locale.
nsILocale newLocaleObject( in nsILocaleDefinition localeDefinition );
localeDefinition
nsILocaleDefinition
.A nsILocale
representing the given locale. Calls to its getCategory method return the values originally passed to the locale definition's addCategory method.