Commit da465db 1 parent dbc68b9 commit da465db Copy full SHA for da465db
File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,10 @@ Load macro and init translations in `lib.rs` or `main.rs`:
40
40
extern crate rust_i18n;
41
41
42
42
// Init translations for current crate.
43
+ // This will load Configuration using the `[package.metadata.i18n]` section in `Cargo.toml` if exists.
44
+ // Or you can pass arguments by `i18n!` to override it.
43
45
i18n!("locales");
44
46
45
- // Or just use `i18n!`, default locales path is: "locales" in current crate.
46
- //
47
- i18n!();
48
-
49
47
// Config fallback missing translations to "en" locale.
50
48
// Use `fallback` option to set fallback locale.
51
49
//
@@ -71,8 +69,7 @@ i18n!("locales",
71
69
// Now, if the message length exceeds 64, the `t!` macro will automatically generate
72
70
// a 12-byte short hashed key with a "t_" prefix for it, if not, it will use the original.
73
71
74
- // Configuration using the `[package.metadata.i18n]` section in `Cargo.toml`,
75
- // Useful for the `cargo i18n` command line tool.
72
+ // If no any argument, use config from Cargo.toml or default.
76
73
i18n!();
77
74
```
78
75
You can’t perform that action at this time.
0 commit comments