MyApp.Cldr.Locale.territory_from_locale
You're seeing just the function
territory_from_locale
, go back to MyApp.Cldr.Locale module for more information.
Specs
territory_from_locale(Cldr.LanguageTag.t() | Cldr.Locale.locale_name()) :: Cldr.territory()
Returns the territory from a language tag or locale name.
Arguments
locale
is any language tag returned beCldr.Locale.new/2
or a locale name in the list returned byCldr.known_locale_names/1
Returns
- A territory code as an atom
Examples
iex> MyApp.Cldr.Locale.territory_from_locale "en-US"
:US
iex> MyApp.Cldr.Locale.territory_from_locale "en-US-u-rg-GBzzzz"
:GB