Skip to main content

Crate rustlavel_i18n

Crate rustlavel_i18n 

Source
Expand description

rustlavel-i18n: translations.

ⓘ
t("welcome.title")
t_with("orders.count", &[("count", "3")])
choice("orders.count", 3)          // picks a plural form

Translations live in lang/<locale>.json, loaded once at boot and shared. Keys are dotted paths into that document, so a file can be organised by area rather than being one flat list.

Modules§

middleware
Choosing a locale per request.

Structs§

Translator
The loaded translations for every locale.

Functions§

from_config
Build a translator from the application’s configuration.