Cldr.LanguageTag.Parser (Cldr v2.28.0) View Source

Parses a CLDR language tag (also referred to as locale string).

The applicable specification is from CLDR which is similar based upon RFC5646 with some variations.

Link to this section Summary

Functions

Parse a locale name into a t:Cldr.LanguageTag

Parse a locale name into a t:Cldr.LanguageTag

Link to this section Functions

Parse a locale name into a t:Cldr.LanguageTag

  • locale_name is a string representation of a language tag as defined by RFC5646.

Returns

  • {:ok, language_tag} or

  • {:error, reasons}

Parse a locale name into a t:Cldr.LanguageTag

  • locale_name is a string representation of a language tag as defined by RFC5646.

Returns

  • language_tag or

  • raises an exception