Cldr.flag

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

Returns a unicode string representing a flag for a territory.

Options

Returns

  • A string representing a flag or

  • An empty string if the territory is valid but no unicode grapheme is defined. This is true for territories that are aggregate areas such as "the world" which is :001

  • {:error, {Cldr.UnknownTerritoryError, message}}

Notes

Examples

iex> Cldr.flag :AU
"πŸ‡¦πŸ‡Ί"

iex> Cldr.flag :US
"πŸ‡ΊπŸ‡Έ"

iex> Cldr.flag "UN"
"πŸ‡ΊπŸ‡³"

iex> Cldr.flag(:UK)
"πŸ‡¬πŸ‡§"

iex> Cldr.flag(:GB)
"πŸ‡¬πŸ‡§"

iex> Cldr.flag(:UX)
{:error, {Cldr.UnknownTerritoryError, "The territory :UX is unknown"}}