kalgan-i18n

A translation tool that retrieves the messages stored in yaml files used by Kalgan Framework.

Examples

This is the yaml file to be used in the following tests: ```yaml

tests/en/messages.yaml

hello: world: Hello World! somebody: Hello {user}! rust use kalgan_i18n::Messages;

let messages: Messages = Messages::new("tests"); rust use kalgan_i18n::Messages;

asserteq!(messages.trans("en", "hello.world", HashMap::new()), "Hello World!"); rust use kalgani18n::Messages;

let mut parameters = HashMap::new(); parameters.insert("user", "John".tostring()); asserteq!(messages.trans("en", "hello.somebody", parameters), "Hello John!"); ```

Documentation

For further information please visit:

License

This crate is licensed under either of the following licenses: