# `Nationality`

A person's nationality, named by the country, as ISO 3166-1 codes it: `GB`. Personal data.

[People and contact](types.md#people-and-contact); not ordered; since Jadpo 0.1.0.

## Make one

Pick one of its variants, `Nationality.ad`.

`text.parse(raw, as: Nationality)` reads one from its text; text that isn't one at all fails `malformed`, such as `GBR`, `British` or `UK`.

## Variants

260 variants, each with the code its text is written in. `ad` (`AD`), `ae` (`AE`), `af` (`AF`), `ag` (`AG`), `ai` (`AI`), `al` (`AL`), `am` (`AM`), `an` (`AN`), `ao` (`AO`), `aq` (`AQ`), `ar` (`AR`), `as` (`AS`), `at` (`AT`), `au` (`AU`), `aw` (`AW`), `ax` (`AX`), `az` (`AZ`), `ba` (`BA`), `bb` (`BB`), `bd` (`BD`), `be` (`BE`), `bf` (`BF`), `bg` (`BG`), `bh` (`BH`), `bi` (`BI`), `bj` (`BJ`), `bl` (`BL`), `bm` (`BM`), `bn` (`BN`), `bo` (`BO`), `bq` (`BQ`), `br` (`BR`), `bs` (`BS`), `bt` (`BT`), `bu` (`BU`), `bv` (`BV`), `bw` (`BW`), `by` (`BY`), `bz` (`BZ`), `ca` (`CA`), `cc` (`CC`), `cd` (`CD`), `cf` (`CF`), `cg` (`CG`), `ch` (`CH`), `ci` (`CI`), `ck` (`CK`), `cl` (`CL`), `cm` (`CM`), `cn` (`CN`), `co` (`CO`), `cr` (`CR`), `cs` (`CS`), `cu` (`CU`), `cv` (`CV`), `cw` (`CW`), `cx` (`CX`), `cy` (`CY`), `cz` (`CZ`), `dd` (`DD`), `de` (`DE`), `dj` (`DJ`), `dk` (`DK`), `dm` (`DM`), `do` (`DO`), `dz` (`DZ`), `ec` (`EC`), `ee` (`EE`), `eg` (`EG`), `eh` (`EH`), `er` (`ER`), `es` (`ES`), `et` (`ET`), `fi` (`FI`), `fj` (`FJ`), `fk` (`FK`), `fm` (`FM`), `fo` (`FO`), `fr` (`FR`), `fx` (`FX`), `ga` (`GA`), `gb` (`GB`), `gd` (`GD`), `ge` (`GE`), `gf` (`GF`), `gg` (`GG`), `gh` (`GH`), `gi` (`GI`), `gl` (`GL`), `gm` (`GM`), `gn` (`GN`), `gp` (`GP`), `gq` (`GQ`), `gr` (`GR`), `gs` (`GS`), `gt` (`GT`), `gu` (`GU`), `gw` (`GW`), `gy` (`GY`), `hk` (`HK`), `hm` (`HM`), `hn` (`HN`), `hr` (`HR`), `ht` (`HT`), `hu` (`HU`), `id` (`ID`), `ie` (`IE`), `il` (`IL`), `im` (`IM`), `in_` (`IN`), `io` (`IO`), `iq` (`IQ`), `ir` (`IR`), `is` (`IS`), `it` (`IT`), `je` (`JE`), `jm` (`JM`), `jo` (`JO`), `jp` (`JP`), `ke` (`KE`), `kg` (`KG`), `kh` (`KH`), `ki` (`KI`), `km` (`KM`), `kn` (`KN`), `kp` (`KP`), `kr` (`KR`), `kw` (`KW`), `ky` (`KY`), `kz` (`KZ`), `la` (`LA`), `lb` (`LB`), `lc` (`LC`), `li` (`LI`), `lk` (`LK`), `lr` (`LR`), `ls` (`LS`), `lt` (`LT`), `lu` (`LU`), `lv` (`LV`), `ly` (`LY`), `ma` (`MA`), `mc` (`MC`), `md` (`MD`), `me` (`ME`), `mf` (`MF`), `mg` (`MG`), `mh` (`MH`), `mk` (`MK`), `ml` (`ML`), `mm` (`MM`), `mn` (`MN`), `mo` (`MO`), `mp` (`MP`), `mq` (`MQ`), `mr` (`MR`), `ms` (`MS`), `mt` (`MT`), `mu` (`MU`), `mv` (`MV`), `mw` (`MW`), `mx` (`MX`), `my` (`MY`), `mz` (`MZ`), `na` (`NA`), `nc` (`NC`), `ne` (`NE`), `nf` (`NF`), `ng` (`NG`), `ni` (`NI`), `nl` (`NL`), `no` (`NO`), `np` (`NP`), `nr` (`NR`), `nt` (`NT`), `nu` (`NU`), `nz` (`NZ`), `om` (`OM`), `pa` (`PA`), `pe` (`PE`), `pf` (`PF`), `pg` (`PG`), `ph` (`PH`), `pk` (`PK`), `pl` (`PL`), `pm` (`PM`), `pn` (`PN`), `pr` (`PR`), `ps` (`PS`), `pt` (`PT`), `pw` (`PW`), `py` (`PY`), `qa` (`QA`), `re` (`RE`), `ro` (`RO`), `rs` (`RS`), `ru` (`RU`), `rw` (`RW`), `sa` (`SA`), `sb` (`SB`), `sc` (`SC`), `sd` (`SD`), `se` (`SE`), `sg` (`SG`), `sh` (`SH`), `si` (`SI`), `sj` (`SJ`), `sk` (`SK`), `sl` (`SL`), `sm` (`SM`), `sn` (`SN`), `so` (`SO`), `sr` (`SR`), `ss` (`SS`), `st` (`ST`), `su` (`SU`), `sv` (`SV`), `sx` (`SX`), `sy` (`SY`), `sz` (`SZ`), `tc` (`TC`), `td` (`TD`), `tf` (`TF`), `tg` (`TG`), `th` (`TH`), `tj` (`TJ`), `tk` (`TK`), `tl` (`TL`), `tm` (`TM`), `tn` (`TN`), `to` (`TO`), `tp` (`TP`), `tr` (`TR`), `tt` (`TT`), `tv` (`TV`), `tw` (`TW`), `tz` (`TZ`), `ua` (`UA`), `ug` (`UG`), `um` (`UM`), `us` (`US`), `uy` (`UY`), `uz` (`UZ`), `va` (`VA`), `vc` (`VC`), `ve` (`VE`), `vg` (`VG`), `vi` (`VI`), `vn` (`VN`), `vu` (`VU`), `wf` (`WF`), `ws` (`WS`), `yd` (`YD`), `ye` (`YE`), `yt` (`YT`), `yu` (`YU`), `za` (`ZA`), `zm` (`ZM`), `zr` (`ZR`), `zw` (`ZW`).

## Text, JSON and storage

`text.from` writes its canonical text, the one form `text.parse` reads back. JSON sends its canonical text as a string.

| Text | JSON |
|---|---|
| `FR` | `"FR"` |
| `GB` | `"GB"` |

It is stored in one column named for the field, of type `text`. `GB` is stored as `'GB'`.

## Shown to people

`text.format(value, locale:)` shows it to people in their locale.

With `locale: Locale.en_gb`:

| Value | Shown |
|---|---|
| `FR` | `France` |
| `GB` | `United Kingdom` |

## Operations

It has the contract's own operations: `text.parse`, `text.from`, `text.format`, `json.read`, `json.write` and `==`. It isn't ordered, so `<` and sorting don't take it. [Every standard type meets one contract](../topics/every-standard-type-meets-one-contract.md) says how they work.
