Skip to content

Commit da465db

Browse files
committed
Update README
1 parent dbc68b9 commit da465db

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

README.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,10 @@ Load macro and init translations in `lib.rs` or `main.rs`:
4040
extern crate rust_i18n;
4141
4242
// 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.
4345
i18n!("locales");
4446
45-
// Or just use `i18n!`, default locales path is: "locales" in current crate.
46-
//
47-
i18n!();
48-
4947
// Config fallback missing translations to "en" locale.
5048
// Use `fallback` option to set fallback locale.
5149
//
@@ -71,8 +69,7 @@ i18n!("locales",
7169
// Now, if the message length exceeds 64, the `t!` macro will automatically generate
7270
// a 12-byte short hashed key with a "t_" prefix for it, if not, it will use the original.
7371
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.
7673
i18n!();
7774
```
7875

0 commit comments

Comments
 (0)