LanguageValues and typesStandard typesPlaces
Language
On this page
A language, written as its two-letter code: en.
Use it to say what language something is in, such as a document or a subtitle. When the region matters as well, as with dates and numbers, use Locale, which tells en-GB from en-US.
Shape
One of 188 values, such as Language.aa, written aa. Details has them.
Example
Language.entext.parse(raw, as: Language) reads one from text that comes from outside. Text that isn't one at all fails malformed, such as eng, en-GB or english.
Good to know
- Each value is its code:
Language.oris Odia. text.formatcan also write the three-letter code,eng, withform: CodeForm.alpha3.==tells you whether two are the same.<andlist.sort_bydon't take it.
In JSON
A string, in a request, a response or json.write:
"en""iw""ja"
Details
Text form, storage, how it is shown, and operations
Language is in the group Places, and has been in Jadpo since 0.1.0.
Every value
Every value, each after Language., with how it is written:
aa, ab, ae, af, ak, am, an, ar, as, av, ay, az, ba, be, bg, bi, bm, bn, bo, br, bs, ca, ce, ch, co, cr, cs, cu, cv, cy, da, de, dv, dz, ee, el, en, eo, es, et, eu, fa, ff, fi, fj, fo, fr, fy, ga, gd, gl, gn, gu, gv, ha, he, hi, ho, hr, ht, hu, hy, hz, ia, id, ie, ig, ii, ik, in, io, is, it, iu, iw, ja, ji, jv, jw, ka, kg, ki, kj, kk, kl, km, kn, ko, kr, ks, ku, kv, kw, ky, la, lb, lg, li, ln, lo, lt, lu, lv, mg, mh, mi, mk, ml, mn, mo, mr, ms, mt, my, na, nb, nd, ne, ng, nl, nn, no, nr, nv, ny, oc, oj, om, or, os, pa, pi, pl, ps, pt, qu, rm, rn, ro, ru, rw, sa, sc, sd, se, sg, si, sk, sl, sm, sn, so, sq, sr, ss, st, su, sv, sw, ta, te, tg, th, ti, tk, tl, tn, to, tr, ts, tt, tw, ty, ug, uk, ur, uz, ve, vi, vo, wa, wo, xh, yi, yo, za, zh, zu.
Text form
text.from writes one standard text form, the same form text.parse reads back: en, iw and ja.
How it is stored
It is stored in one column named for the field, of type text. ja is stored as 'ja'.
How it is shown to people
text.format(value, locale:) shows it to people in their locale.
With locale: Locale.en_gb:
| Value | Shown |
|---|---|
en |
English |
iw |
Hebrew |
ja |
Japanese |
or |
Odia |
Operations
It also takes text.parse, text.from, text.format, json.read, json.write and ==. How every standard type behaves says how they work.
Markdown for agents: /docs/types/type-language.md.Built from Jadpo main at aee2e8f.