Formerly reserve-protocol/elm-i3166-data. Search finds this package by either name.
Information about world countries. This library contains lists of facts about countries.
Find the name of a country including the country name in local language in parenthesis
Find the flag of a country in a sprite sheet.
> import Iso3166
> Dict.get Iso3166.flagPositions "MX"
Just ( -112, -144 )
: Maybe.Maybe (Float, Float)
> import Html exposing (div)
> (x, y) = (-112, -144)
> div
[ style "background-image" ("url(\"" ++ Iso3166.flagImageData ++ "\")"
, style "background-position" (String.fromFloat x ++ "px " ++ String.fromFloat y ++ "px")
]
[]