Skip to main content

Module i18n

Module i18n 

Source
Expand description

The interface languages (doc 34, section 8): the catalogs in locales/, the choice of language and the formats that depend on it (numbers, sizes, durations, dates).

Structs§

Civil
The calendar fields of an instant, in UTC.

Enums§

Lang
The languages the interface speaks. en-US is the source and the fallback.

Constants§

LANGS
Every language, in the order the language chooser shows them.

Functions§

bytes
A size in binary units (KiB, MiB, GiB…), the same in both languages.
civil_from_ms
clock
The time of day, HH:MM:SS in UTC.
date_time
A date and time in UTC, in the language’s order (2026-10-15 12:00:00 or 15/10/2026 12:00:00).
decimal
A number with places decimals and the language’s decimal mark.
detect
Chooses the language, the first that exists: --lang, TABA_CLI_LANG, ui.language, the system’s locale (LC_ALL, LC_MESSAGES, LANG, then the operating system’s) and en-US.
duration
A length of time as 1d 02h, 3h 05m, 4m 07s or 9s.
group
An integer with the language’s thousands separator.
parse_instant
An RFC 3339 instant (2026-10-15T12:00:00.123Z, or with an offset) as milliseconds since the epoch.
tr
The text of a catalog key. A key missing from the language falls back to en-US and then to the key itself: it never breaks the screen (the parity test catches it before the release).
tr_n
The text of key.one or key.other by the count, with %{n} replaced.
tr_with
The text of a key with its %{name} variables replaced.
variables
The variables (%{name}) a catalog text uses, sorted.