patois 0.2.0

A lightweight, domain-aware i18n library for Rust desktop applications.
Documentation

Patois - lightweight i18n for Rust desktop apps and utility crates.

Quick start

In library crates, no translation infrastructure is needed:

use patois::t;
fn update_message() -> String { t("Checking for updates...") }

The host app registers a default domain; t() finds the translation there.

App crates require you to register a domain at startup:

patois::init("paperback", "./langs", "de_DE");

All subsequent t() calls (in any crate) look up in paperback.mo.

Advanced: per-crate domain inference

t! and nt! expand env!("CARGO_PKG_NAME") at compile time, falling back to the default domain when no crate-specific catalog is registered.