module

Cl8r::I18n

Class methods

init!(cli_lang : String | Nil = nil) : Locale

Initializes the active locale from CLI options, config.yaml, or environment variables.

Source
locale

Returns the currently active Locale.

Source
locale=(loc : Locale) : Locale

Explicitly sets the active Locale.

Source
t(msg_id : String, vars : Hash(String, String)) : String

Translates a key with Hash variable interpolation.

Source
t(msg_id : String) : String

Translates a key without interpolation.

Source
t(msg_id : String, **vars) : String

Translates a key with variable interpolation (e.g. t("cli.config.saved", key: "language", value: "es-MX"))

Source

Nested types