Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Jan 31, 2024
1 parent dbc68b9 commit da465db
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,10 @@ Load macro and init translations in `lib.rs` or `main.rs`:
extern crate rust_i18n;
// Init translations for current crate.
// This will load Configuration using the `[package.metadata.i18n]` section in `Cargo.toml` if exists.
// Or you can pass arguments by `i18n!` to override it.
i18n!("locales");
// Or just use `i18n!`, default locales path is: "locales" in current crate.
//
i18n!();
// Config fallback missing translations to "en" locale.
// Use `fallback` option to set fallback locale.
//
Expand All @@ -71,8 +69,7 @@ i18n!("locales",
// Now, if the message length exceeds 64, the `t!` macro will automatically generate
// a 12-byte short hashed key with a "t_" prefix for it, if not, it will use the original.
// Configuration using the `[package.metadata.i18n]` section in `Cargo.toml`,
// Useful for the `cargo i18n` command line tool.
// If no any argument, use config from Cargo.toml or default.
i18n!();
```

Expand Down

0 comments on commit da465db

Please sign in to comment.