Cldr.validate_gettext_locale

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

validate_gettext_locale(locale_name, backend \\ default_backend!())

View Source

Specs

validate_gettext_locale(
  Cldr.Locale.locale_name() | Cldr.LanguageTag.t(),
  backend()
) :: {:ok, Cldr.LanguageTag.t()} | {:error, {module(), String.t()}}

Normalise and validate a gettext locale name.

Arguments

Returns

  • {:ok, language_tag}

  • {:error, reason}

Examples