goog.locale
Namespacegoog.locale.Resource
EnumEnum of resources that can be registered. … more
.TimeZoneFingerprint
Time zone fingerprint mapping to time zone list.
.TimeZoneList
.countries
{Array
}List of codes for countries valid today.
.defaultLocaleNameConstants
Default list of locale specific country and language names
goog.locale.genericFontNames
Namespace.genericFontNamesData
{Object
}Map from script code or language code to list of pairs of (generic name, font name fallback list).
.getLanguageSubTag(languageCode)
Returns the language-subtag of the given language code.
languageCode
{string
}
string
}
.getLocale()
[deprecated]Deprecated. Use goog.LOCALE and goog.i18n instead.
Retrieve the currnet locale
string
}
.getLocalizedCountryName(languageCode, opt_localeSymbols)
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__ 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__ 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.
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.
Returns the region-sub-tag of the given language code.
Retrieve specified resource for certain locale.
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.
Returns the script subtag of the locale with the first alphabet in uppercase
and the rest 3 characters in lower case.
Returns the displayable list of long timezone names paired with its id for
the current locale.
This method depends on goog.locale.TimeZoneAllLongNames__ 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*__ 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*__ Returns the variant-sub-tag of the given language code.
Returns true if the required resource has already been registered.
Native country and language names
Registers the LocaleNameConstants constants object for a given locale name.
Register a resource object for certain locale.
Registers the TimeZoneAllLongNames constants object for a given locale name.
Deprecated. Use goog.i18n.TimeZone, no longer need this.
Registers the timezone constants object for a given locale name.
Registers the TimeZoneSelectedIds constants object for a given locale name.
Registers the TimeZoneSelectedLongNames constants object for a given locale
name.
Registers the TimeZoneSelectedShortNames constants object for a given
locale name.
The script code to list of language codes map.
Set currnet locale to the specified one.
languageCode
{string
}
opt_localeSymbols
{Object
=}
string
}
.getLocalizedLanguageName(languageCode, opt_localeSymbols)
languageCode
{string
}
opt_localeSymbols
{Object
=}
string
}
.getNativeCountryName(countryCode)
countryCode
{string
}
string
}
.getNativeLanguageName(languageCode)
languageCode
{string
}
string
}
.getRegionSubTag(languageCode)
languageCode
{string
}
string
}
.getResource(resourceName, opt_locale)
resourceName
{string
}
opt_locale
{string
=}
Object
|undefined
}
.getResourceWithFallback(resourceName, opt_locale)
resourceName
{string
}
opt_locale
{string
=}
Object
|undefined
}
.getScriptSubTag(languageCode)
languageCode
{string
}
string
}
.getTimeZoneAllLongNames()
Array
.<Object
>}
.getTimeZoneSelectedLongNames(opt_regionOrLang)
opt_regionOrLang
{string
=}
Array
.<Object
>}
.getTimeZoneSelectedShortNames(opt_regionOrLang)
opt_regionOrLang
{string
=}
Array
.<Object
>}
.getVariantSubTag(languageCode)
languageCode
{string
}
string
}
.isResourceRegistered(resourceName, localeName)
resourceName
{goog.locale.Resource
|string
}
localeName
{string
}
boolean
}
.nativeNameConstants
{Object
}.registerLocaleNameConstants(dataObj, localeName)
dataObj
{Object
}
localeName
{string
}
.registerResource(dataObj, resourceName, localeName)
dataObj
{Object
}
resourceName
{goog.locale.Resource
|string
}
localeName
{string
}
.registerTimeZoneAllLongNames(dataObj, localeName)
dataObj
{Object
}
localeName
{string
}
.registerTimeZoneConstants(dataObj, localeName)
[deprecated]
dataObj
{Object
}
localeName
{string
}
.registerTimeZoneSelectedIds(dataObj, localeName)
dataObj
{Object
}
localeName
{string
}
.registerTimeZoneSelectedLongNames(dataObj, localeName)
dataObj
{Object
}
localeName
{string
}
.registerTimeZoneSelectedShortNames(dataObj, localeName)
dataObj
{Object
}
localeName
{string
}
.scriptToLanguages
{Object
}.setLocale(localeName)
localeName
{string
}
The
goog.locale.timeZoneDetection
Namespace