locale

Classes


Public Protected Private

Enumerations

goog.locale.Resource :
Enum of resources that can be registered.
Constants:
DATE_TIME_CONSTANTS
No description.
LOCAL_NAME_CONSTANTS
No description.
NUMBER_FORMAT_CONSTANTS
No description.
TIME_ZONE_ALL_LONG_NAMES
No description.
TIME_ZONE_CONSTANTS
No description.
TIME_ZONE_SELECTED_IDS
No description.
TIME_ZONE_SELECTED_LONG_NAMES
No description.
TIME_ZONE_SELECTED_SHORT_NAMES
No description.
Code »
goog.locale.TimeZoneFingerprint :
Time zone fingerprint mapping to time zone list.
Constants:
1001739662
No description.
1037565906
No description.
105862464
No description.
1286253222
No description.
1294772902
No description.
12
No description.
1373765610
No description.
1465210176
No description.
1465865536
No description.
20
No description.
22
No description.
24
No description.
25
No description.
269133956
No description.
26
No description.
28
No description.
29
No description.
30
No description.
312471854
No description.
32
No description.
34
No description.
35
No description.
36
No description.
37
No description.
38
No description.
39
No description.
403351686
No description.
40
No description.
41025476
No description.
411740806
No description.
41
No description.
42
No description.
44
No description.
456480044
No description.
46
No description.
474655352
No description.
483044050
No description.
483699410
No description.
487587858
No description.
487915538
No description.
48
No description.
491433170
No description.
492088530
No description.
495058823
No description.
497024903
No description.
49938444
No description.
501219282
No description.
50
No description.
52
No description.
54
No description.
559943005
No description.
56
No description.
570425352
No description.
572522538
No description.
581567010
No description.
58
No description.
592794974
No description.
599086472
No description.
599086512
No description.
60
No description.
617261764
No description.
617261788
No description.
617786052
No description.
626175196
No description.
626175324
No description.
626306268
No description.
626338524
No description.
626339164
No description.
626347356
No description.
626392412
No description.
62
No description.
635437856
No description.
64
No description.
662525310
No description.
66
No description.
670913918
No description.
671787146
No description.
67
No description.
680176266
No description.
68
No description.
6
No description.
70
No description.
710950176
No description.
72
No description.
76502378
No description.
769654750
No description.
771751924
No description.
778043508
No description.
805300897
No description.
805312524
No description.
805312908
No description.
805337484
No description.
830603252
No description.
836894706
No description.
836894708
No description.
838860786
No description.
838860812
No description.
839516172
No description.
850043558
No description.
897537370
No description.
8
No description.
901076366
No description.
905969678
No description.
919994368
No description.
919994592
No description.
928339288
No description.
931091802
No description.
931091834
No description.
937427058
No description.
939480410
No description.
939579406
No description.
941621262
No description.
943019406
No description.
946339336
No description.
947956358
No description.
948087430
No description.
952805774
No description.
970325971
No description.
970326003
No description.
973078513
No description.
983564836
No description.
984437412
No description.
Code »

Global Functions

goog.locale.getLanguageSubTag(languageCode) string
Returns the language-subtag of the given language code.
Arguments:
languageCode : string
Language code to extract language subtag from.
Returns: string  Language subtag (in lowercase).
code »
goog.locale.getLocale() string
Use goog.LOCALE and goog.i18n instead. Retrieve the current locale
Returns: string  Current locale name string.
code »
goog.locale.getLocalizedCountryName(languageCodeopt_localeSymbols) string
Returns the localized country name for the provided language code in the current or provided locale symbols set. This method depends on goog.locale.LocaleNameConstants__ available from http://go/js_locale_data. User of this method has to add dependency to this.
Arguments:
languageCode : string
Language code to lookup the country name for.
opt_localeSymbols : Object=
If omitted the current locale symbol set is used.
Returns: string  Localized country name.
code »
goog.locale.getLocalizedLanguageName(languageCodeopt_localeSymbols) string
Returns the localized language name for the provided language code in the current or provided locale symbols set. This method depends on goog.locale.LocaleNameConstants__ available from http://go/js_locale_data. User of this method has to add dependency to this.
Arguments:
languageCode : string
Language code to lookup the language name for.
opt_localeSymbols : Object=
locale symbol set if given.
Returns: string  Localized language name of the provided language code.
code »
goog.locale.getNativeCountryName(countryCode) string
Returns the country name of the provided language code in its native language. This method depends on goog.locale.nativeNameConstants available from nativenameconstants.js. User of this method has to add dependency to this.
Arguments:
countryCode : string
Code to lookup the country name for.
Returns: string  Country name for the provided language code.
code »
goog.locale.getNativeLanguageName(languageCode) string
Returns the language name of the provided language code in its native language. This method depends on goog.locale.nativeNameConstants available from nativenameconstants.js. User of this method has to add dependency to this.
Arguments:
languageCode : string
Language code to lookup the language name for.
Returns: string  Language name for the provided language code.
code »
goog.locale.getRegionSubTag(languageCode) string
Returns the region-sub-tag of the given language code.
Arguments:
languageCode : string
Language code to extract region subtag from.
Returns: string  Region sub-tag (in uppercase).
code »
goog.locale.getResource(resourceNameopt_locale) Object | undefined
Retrieve specified resource for certain locale.
Arguments:
resourceName : string
String that represents the type of resource.
opt_locale : string=
Locale ID, if not given, current locale will be assumed.
Returns: Object | undefined  The resource object that hold all the resource data, or undefined if not available.
code »
goog.locale.getResourceWithFallback(resourceNameopt_locale) Object | undefined
Retrieve specified resource for certain locale with fallback. For example, request of 'zh_CN' will be resolved in following order: zh_CN, zh, en. If none of the above succeeds, of if the resource as indicated by resourceName does not exist at all, undefined will be returned.
Arguments:
resourceName : string
String that represents the type of resource.
opt_locale : string=
locale ID, if not given, current locale will be assumed.
Returns: Object | undefined  The resource object for desired locale.
code »
goog.locale.getScriptSubTag(languageCode) string
Returns the script subtag of the locale with the first alphabet in uppercase and the rest 3 characters in lower case.
Arguments:
languageCode : string
Language Code to extract script subtag from.
Returns: string  Script subtag.
code »
goog.locale.getTimeZoneAllLongNames() Array.<Object>
Returns the displayable list of long timezone names paired with its id for the current locale. This method depends on goog.locale.TimeZoneAllLongNames__ available from http://go/js_locale_data. Users of this method must add a dependency on this.
Returns: Array.<Object>  localized and relevant list of timezone names and ids.
code »
goog.locale.getTimeZoneNameList_(nameTypeopt_resource) !Array.<Object>
Returns the displayable list of timezone names paired with its id for the current locale, selected based on the region or language provided. This method depends on goog.locale.TimeZone*__ available from http://go/js_locale_data. Users of this method must add a dependency on this.
Arguments:
nameType : string
Resource name to be loaded to get the names.
opt_resource : string=
If resource is region tag, timezone ids specific this region are considered. If it is language, all regions for which this language is defacto official is considered. If it is undefined, current locale is used to extract this information.
Returns: !Array.<Object>  Localized and relevant list of timezone names and ids.
code »
goog.locale.getTimeZoneSelectedLongNames(opt_regionOrLang) !Array.<Object>
Returns the displayable list of long timezone names paired with its id for the current locale, selected based on the region or language provided. This method depends on goog.locale.TimeZone*__ available from http://go/js_locale_data. Users of this method must add a dependency on this.
Arguments:
opt_regionOrLang : string=
If region tag is provided, timezone ids specific this region are considered. If language is provided, all regions for which this language is defacto official is considered. If this parameter is not speficied, current locale is used to extract this information.
Returns: !Array.<Object>  Localized and relevant list of timezone names and ids.
code »
goog.locale.getTimeZoneSelectedShortNames(opt_regionOrLang) !Array.<Object>
Returns the displayable list of short timezone names paired with its id for the current locale, selected based on the region or language provided. This method depends on goog.locale.TimeZone*__ available from http://go/js_locale_data. Users of this method must add a dependency on this.
Arguments:
opt_regionOrLang : string=
If region tag is provided, timezone ids specific this region are considered. If language is provided, all regions for which this language is defacto official is considered. If this parameter is not speficied, current locale is used to extract this information.
Returns: !Array.<Object>  Localized and relevant list of timezone names and ids.
code »
goog.locale.getVariantSubTag(languageCode) string
Returns the variant-sub-tag of the given language code.
Arguments:
languageCode : string
Language code to extract variant subtag from.
Returns: string  Variant sub-tag.
code »
goog.locale.isResourceRegistered(resourceNamelocaleName) boolean
Returns true if the required resource has already been registered.
Arguments:
resourceName : goog.locale.Resource | string
String that represents the type of resource.
localeName : string
Locale ID.
Returns: boolean  Whether the required resource has already been registered.
code »
goog.locale.registerLocaleNameConstants(dataObjlocaleName)
Registers the LocaleNameConstants constants object for a given locale name.
Arguments:
dataObj : Object
The resource object.
localeName : string
Locale ID.
code »
goog.locale.registerResource(dataObjresourceNamelocaleName)
Register a resource object for certain locale.
Arguments:
dataObj : Object
The resource object being registered.
resourceName : goog.locale.Resource | string
String that represents the type of resource.
localeName : string
Locale ID.
code »
goog.locale.registerTimeZoneAllLongNames(dataObjlocaleName)
Registers the TimeZoneAllLongNames constants object for a given locale name.
Arguments:
dataObj : Object
The resource object.
localeName : string
Locale ID.
code »
goog.locale.registerTimeZoneConstants(dataObjlocaleName)
Use goog.i18n.TimeZone, no longer need this. Registers the timezone constants object for a given locale name.
Arguments:
dataObj : Object
The resource object.
localeName : string
Locale ID.
code »
goog.locale.registerTimeZoneSelectedIds(dataObjlocaleName)
Registers the TimeZoneSelectedIds constants object for a given locale name.
Arguments:
dataObj : Object
The resource object.
localeName : string
Locale ID.
code »
goog.locale.registerTimeZoneSelectedLongNames(dataObjlocaleName)
Registers the TimeZoneSelectedLongNames constants object for a given locale name.
Arguments:
dataObj : Object
The resource object.
localeName : string
Locale ID.
code »
goog.locale.registerTimeZoneSelectedShortNames(dataObjlocaleName)
Registers the TimeZoneSelectedShortNames constants object for a given locale name.
Arguments:
dataObj : Object
The resource object.
localeName : string
Locale ID.
code »
goog.locale.setLocale(localeName)
Set currnet locale to the specified one.
Arguments:
localeName : string
Locale name string. We are following the usage in CLDR, but can make a few compromise for existing name compatibility.
code »

Global Properties

goog.locale.TimeZoneList :
No description.
Code »
goog.locale.TimeZoneListTest :
No description.
Code »
goog.locale.activeLocale_ :
No description.
Code »
goog.locale.countries :
List of codes for countries valid today.
Code »
goog.locale.countryLanguageNamesTest :
No description.
Code »
goog.locale.defaultLocaleNameConstants :
Default list of locale specific country and language names
Code »
goog.locale.genericFontNames :
No description.
Code »
goog.locale.genericFontNamesData :
Map from script code or language code to list of pairs of (generic name, font name fallback list).
Code »
goog.locale.genericFontNamesTest :
No description.
Code »
goog.locale.nativeNameConstants :
Native country and language names
Code »
goog.locale.resourceRegistry_ :
This object maps (resourceName, localeName) to a resourceObj.
Code »
goog.locale.scriptToLanguages :
The script code to list of language codes map.
Code »
goog.locale.timeZoneDetection :
No description.
Code »
goog.locale.timeZoneDetectionTest :
No description.
Code »

Package locale

Package Reference