MyApp.Cldr.Territory.translate_language_tag

You're seeing just the function translate_language_tag, go back to MyApp.Cldr.Territory module for more information.
Link to this function

translate_language_tag(from_locale, options \\ [locale: MyApp.Cldr.get_locale(), style: :standard])

View Source

Specs

translate_language_tag(Cldr.Territory.tag(), Cldr.Territory.options()) ::
  {:ok, binary()} | {:error, Cldr.Territory.error()}

Translate a LanguageTag.t into a localized string from one locale to another. Returns {:ok, result} if successful, otherwise {:error, reason}.

Example

iex> MyApp.Cldr.Territory.translate_language_tag(Cldr.get_locale())
{:ok, "world"}

iex> MyApp.Cldr.Territory.translate_language_tag(Cldr.get_locale(), [locale: Cldr.Locale.new!("pt", TestBackend.Cldr)])
{:ok, "Mundo"}