i18n-next
i18n for Rust on the same locale files as nuxt-i18n-micro:
global and per-page translations, plurals and Intl-compatible formats, native and wasm,
with no runtime dependencies.
Documentation: https://s00d.github.io/i18n-next-rs/
Status: pre-release (0.1). Root and page chunks, fallback chains, i18n.json, plurals
(CLDR rules as in Intl.PluralRules), linked messages, Text (the Rust <i18n-t>), t! and
scope, numbers, dates and relative time as Intl shows them (own CLDR 48 data and time
zones), lazy and remote loading, and a Rust guest for the
Tauri plugin. Not published yet.
use ;
let i18n = builder
.locale
.fallback
.files
.build?;
assert_eq!;
assert_eq!; // fallback
assert_eq!;
assert_eq!; // CLDR plural rules
let hi = i18n.text.arg; // lazy: shown when displayed
i18n.set_locale?;
assert_eq!;
# Ok::
Or install it once and write t!("hi", name = "Ann") anywhere; scope() sets the locale
of a request or a task. Default features: std, format, tz, global; default-features = false is the micro build. I18N_NEXT_LOCALES=en,de,ru at build time keeps only the CLDR
data you ship.
Guides, platforms (desktop, Android, iOS, browser, Tauri guest) and the feature list: https://s00d.github.io/i18n-next-rs/.
License: MIT.