MyApp.Cldr.Territory.available_territories
You're seeing just the function
available_territories
, go back to MyApp.Cldr.Territory module for more information.
Specs
available_territories(Cldr.Territory.binary_tag()) :: [atom()] | {:error, Cldr.Territory.error()}
Returns the available territories for a given locale.
locale
is any configured locale. SeeMyApp.Cldr.Territory.known_locale_names/0
. The default isCldr.get_locale/0
Example
=> MyApp.Cldr.Territory.available_territories()
[:"001", :"002", :"003", :"005", :"009", :"011", :"013", :"014", :"015", :"017",
:"018", :"019", :"021", :"029", :"030", :"034", :"035", :"039", :"053", :"054",
:"057", :"061", :"142", :"143", :"145", :"150", :"151", :"154", :"155", :"202",
:"419", :AC, :AD, :AE, :AF, :AG, :AI, :AL, :AM, :AO, :AQ, :AR, :AS, :AT, :AU,
:AW, :AX, :AZ, :BA, :BB, ...]
=> MyApp.Cldr.Territory.available_territories("zzz")
{:error, {Cldr.UnknownLocaleError, "The locale "zzz" is not known."}}