Cldr.LanguageTag.to_string

You're seeing just the function to_string, go back to Cldr.LanguageTag module for more information.

Specs

to_string(t()) :: String.t()

Reconstitute a textual language tag from a LanguageTag that is suitable to pass to a collator.

Arguments

Returns

  • A formatted string representation of the language tag that is also parseable back into a Cldr.LanguageTag.t()

Examples

iex> {:ok, locale} = Cldr.validate_locale "en-US", MyApp.Cldr
iex> Cldr.LanguageTag.to_string(locale)
"en-Latn-US"

iex> {:ok, locale} = Cldr.validate_locale "en-US-u-co-phonebk-nu-arab", MyApp.Cldr
iex> Cldr.LanguageTag.to_string(locale)
"en-Latn-US-u-co-phonebk-nu-arab"