json-gettext 2.1.0

A library for getting text from JSON usually for internationalization.
json-gettext-2.1.0 doesn't have any documentation.

JSON Get Text

Build Status Build status

This is a library for getting text from JSON usually for internationalization.

Example

#[macro_use] extern crate json_gettext;
#[macro_use] extern crate lazy_static;
#[macro_use] extern crate lazy_static_include;

let ctx = static_json_gettext_build!(
            "en_US",
            "en_US", "langs/en_US.json",
            "zh_TW", "langs/zh_TW.json"
        ).unwrap();

assert_eq!("Hello, world!", get_text!(ctx, "hello").unwrap());
assert_eq!("哈囉,世界!", get_text!(ctx, "zh_TW", "hello").unwrap());

In order to reduce the compilation time, the static_json_gettext_build macro has files compiled into your executable binary file together, only when you are using the release profile.

Crates.io

https://crates.io/crates/json-gettext

Documentation

https://docs.rs/json-gettext

License

MIT