JSON Get Text

Build Status Build status

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

Sample Code

```rust

[macro_use]

extern crate json_gettext;

let ctx = staticjsongettextbuild!("enUS", "enUS", "langs/enUS.json", "zhTW", "langs/zhTW.json" ).unwrap();

asserteq!("Hello, world!", gettext!(ctx, "hello").unwrap()); asserteq!("哈囉,世界!", gettext!(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