Cldr.LanguageTag.Sigil.sigil_l

You're seeing just the macro sigil_l, go back to Cldr.LanguageTag.Sigil module for more information.
Link to this macro

sigil_l(locale_name, arg2)

View Source (macro)

Handles sigil ~l for language tags.

Arguments

  • locale_name is either a BCP 47 locale name as a string or

  • locale_name | backend where backend is a backend module name

Options

  • u Will parse the locale but will not add likely subtags and its not guaranteed that this language tag is known to the backend module.

Returns

  • a t:Cldr.LanguageTag struct or

  • raises an exception

Examples

iex> import Cldr.LanguageTag.Sigil
iex> ~l(en-US-u-ca-gregory)
#Cldr.LanguageTag<en-US-u-ca-gregory [validated]>

iex> import Cldr.LanguageTag.Sigil
iex> ~l(en-US-u-ca-gregory|MyApp.Cldr)
#Cldr.LanguageTag<en-US-u-ca-gregory [validated]>