Name Description Size
android 2
cldr-quotes.inc 2546
cldr-quotes.pl 3675
components.conf 1051
DateTimeFormat.cpp static 11741
DateTimeFormat.h mozilla_DateTimeFormat_h 3699
encodingsgroups.properties 872
gtk 2
language.properties 6169
LocaleService.cpp This function splits an input string by `,` delimiter, sanitizes the result language tags and returns them to the caller. 19776
LocaleService.h LocaleService is a manager of language negotiation in Gecko. It's intended to be the core place for collecting available and requested languages and negotiating them to produce a fallback chain of locales for the application. Client / Server LocaleService may operate in one of two modes: server in the server mode, LocaleService is collecting and negotiating languages. It also subscribes to relevant observers. There should be at most one server per application instance. client in the client mode, LocaleService is not responsible for collecting or reacting to any system changes. It still distributes information about locales, but internally, it gets information from the server instance instead of collecting it on its own. This prevents any data desynchronization and minimizes the cost of running the service. In both modes, all get* methods should work the same way and all static methods are available. In the server mode, other components may inform LocaleService about their status either via calls to set* methods or via observer events. In the client mode, only the process communication should provide data to the LocaleService. At the moment desktop apps use the parent process in the server mode, and content processes in the client mode. Locale / Language The terms `Locale ID` and `Language ID` are used slightly differently by different organizations. Mozilla uses the term `Language ID` to describe a string that contains information about the language itself, script, region and variant. For example "en-Latn-US-mac" is a correct Language ID. Locale ID contains a Language ID plus a number of extension tags that contain information that go beyond language inforamation such as preferred currency, date/time formatting etc. An example of a Locale ID is `en-Latn-US-x-hc-h12-ca-gregory` At the moment we do not support full extension tag system, but we try to be specific when naming APIs, so the service is for locales, but we negotiate between languages etc. 7672
mac 2
moz.build 2018
mozILocaleService.idl List of language negotiation strategies to use. For an example list of requested and available locales: Requested: ['es-MX', 'fr-FR'] Available: ['fr', 'fr-CA', 'es', 'es-MX', 'it'] DefaultLocale: ['en-US'] each of those strategies will build a different result: filtering (default) - Matches as many of the available locales as possible. Result: Supported: ['es-MX', 'es', 'fr', 'fr-CA', 'en-US'] matching - Matches the best match from the available locales for every requested locale. Result: Supported: ['es-MX', 'fr', 'en-US'] lookup - Matches a single best locale. This strategy always returns a list of the length 1 and requires a defaultLocale to be set. Result: Supported: ['es-MX'] 6447
mozIOSPreferences.idl Returns a list of locales used by the host environment for UI localization. The result is a sorted list and we expect that the OS attempts to use the top locale from the list for which it has data. Each element of the list is a valid locale ID that can be passed to ICU and ECMA402 Intl APIs, At the same time each element is a valid BCP47 language tag that can be used for language negotiation. Example: ["en-US", "de", "pl", "sr-Cyrl", "zh-Hans-HK"] 3604
MozLocale.cpp Note: The file name is `MozLocale` to avoid compilation problems on case-insensitive Windows. The class name is `Locale`. 1783
MozLocale.h Locale class is a core representation of a single locale. A locale is a data object representing a combination of language, script, region, variant and a set of regional extension preferences that may further specify particular user choices like calendar, numbering system, etc. A locale can be expressed as a language tag string, like a simple "fr" for French, or a more specific "sr-Cyrl-RS-u-hc-h12" for Serbian in Russia with a Cyrylic script, and hour cycle selected to be `h12`. The format of the language tag follows BCP47 standard and implements a subset of it. In the future we expect to extend this class to cover more subtags and extensions. BCP47: https://tools.ietf.org/html/bcp47 The aim of this class it aid in validation, parsing and canonicalization of the string. It allows the user to input any well-formed BCP47 language tag and operate on its subtags in a canonicalized form. It should be used for all operations on language tags, and together with LocaleService::NegotiateLanguages for language negotiation. Example: Locale loc = Locale("de-at"); ASSERT_TRUE(loc.GetLanguage().Equals("de")); ASSERT_TRUE(loc.GetScript().IsEmpty()); ASSERT_TRUE(loc.GetRegion().Equals("AT")); // canonicalized to upper case Note: The file name is `MozLocale` to avoid compilation problems on case-insensitive Windows. The class name is `Locale`. 5270
MozLocaleBindings.h 672
nsLanguageAtomService.cpp 7970
nsLanguageAtomService.h The nsILanguageAtomService provides a mapping from languages or charsets to language groups, and access to the system locale language. 2285
nsUConvPropertySearch.cpp 1182
nsUConvPropertySearch.h Looks up a property by value. @param aProperties the static property array @param aKey the key to look up @param aValue the return value (empty string if not found) @return NS_OK if found or NS_ERROR_FAILURE if not found 1033
OSPreferences.cpp This is a shared part of the OSPreferences API implementation. It defines helper methods and public methods that are calling platform-specific private methods. 18432
OSPreferences.h OSPreferences API provides a set of methods for retrieving information from the host environment on topics such as: - Internationalization - Localization - Regional preferences The API is meant to remain as simple as possible, relaying information from the host environment to the user without too much logic. Saying that, there are two exceptions to that paradigm. First one is normalization. We do intend to translate host environment concepts to unified Intl/L10n vocabulary used by Mozilla. That means that we will format locale IDs, timezone names, currencies etc. into a chosen format. Second is caching. This API does cache values and where possible will hook into the environment for some event-driven cache invalidation. This means that on platforms that do not support a mechanism to notify apps about changes, new OS-level settings may not be reflected in the app until it is relaunched. 6547
PluralForm.jsm This module provides the PluralForm object which contains a method to figure out which plural form of a word to use for a given number based on the current localization. There is also a makeGetter method that creates a get function for the desired plural rule. This is useful for extensions that specify their own plural rule instead of relying on the browser default. (I.e., the extension hasn't been localized to the browser's locale.) See: http://developer.mozilla.org/en/docs/Localization_and_Plurals NOTE: any change to these plural forms need to be reflected in compare-locales: https://hg.mozilla.org/l10n/compare-locales/file/default/compare_locales/plurals.py List of methods: string pluralForm get(int aNum, string aWords) int numForms numForms() [string pluralForm get(int aNum, string aWords), int numForms numForms()] makeGetter(int aRuleNum) Note: Basically, makeGetter returns 2 functions that do "get" and "numForm" 8429
props2arrays.py 899
Quotes.cpp 2515
Quotes.h Return a pointer to the Quotes record for the given locale (lang attribute), or nullptr if none available. The returned value points to a hashtable entry, but will remain valid until shutdown begins, as the table is not modified after initialization. 1266
rust 2
tests 3
windows 2