Cldr.Locale.locale_name_from
You're seeing just the function
locale_name_from
, go back to Cldr.Locale module for more information.
Specs
locale_name_from(Cldr.LanguageTag.t()) :: locale_name()
Return a locale name from a Cldr.LanguageTag
Options
locale_name
is anyCldr.LanguageTag
struct returned byCldr.Locale.new!/2
Example
iex> Cldr.Locale.locale_name_from Cldr.Locale.new!("en", TestBackend.Cldr)
"en-Latn-US"
Specs
locale_name_from( language(), script(), Cldr.territory() | territory(), variant() ) :: locale_name()
Return a locale name by combining language, script, territory and variant parameters
Arguments
language
,script
,territory
andvariant
are string representations, ornil
, of the language subtags
Returns
- The locale name constructed from the non-nil arguments joined by a "-"
Example
iex> Cldr.Locale.locale_name_from("en", "Latn", "001", nil)
"en-Latn-001"
iex> Cldr.Locale.locale_name_from("en", "Latn", :"001", nil)
"en-Latn-001"