Crate rosetta_i18n[][src]

Expand description

Easy-to-use i18n library for Rust, based on code generation.

Usage

Please read the documentation to learn how to use this library.

mod translations {
    rosetta_i18n::include_translations!();
}

fn main() {
    assert_eq!(Lang::En.hello(), "Hello world!");
}

Serde support

This crate provide serialization and deserialization of languages types with Serde. The serde feature must be enabled.

Modules

Helpers to use serialize and deserialize types that implement Language.

Macros

Include the generated translations.

Structs

Generic language type that implement the Language trait.

ISO 639-1 language identifier.

Traits

Trait implemented by languages structs generated by rosetta-build.