A simple i18n library for rust
Configs
- The default language files is under
src/languages
,and you could change it by the env varINTL_RS_DIR
- The default locale(default_locale property) is
zh_CN
, and you could change it by the env varINTL_RS_LANG
Config File
Just support the json file for example en_US.json
like below
Usages
;
let key = "hello.world";
assert_eq!;
assert_eq!;
//default to ensure fallback
//and you can disable it by disable_fallback function
let configs = I18nConfig ;
assert_eq!;
let configs = I18nConfig ;
assert_eq!;
//change the default null placeholder
let configs = I18nConfig ;
assert_eq!;
set_var