Skip to content

Commit 9196de0

Browse files
committed
fix i18n-embed version in readme and fix incorrect comment in i18n-embed code example.
- fixes #18 - fixes #19
1 parent d2a5650 commit 9196de0

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Now that you have compiled your translations, you can embed them within your app
8383
Add the following to your `Cargo.toml` dependencies:
8484

8585
```toml
86-
i18n-embed = "0.3.1"
86+
i18n-embed = "0.4"
8787
```
8888

8989
A minimal example for how to embed the compiled translations into your application could be:

i18n-embed/src/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,7 @@
150150
//! static ref LANGUAGE_LOADER: MyLanguageLoader = MyLanguageLoader::new();
151151
//! }
152152
//!
153-
//! /// Localize this library, and select the language using the provided
154-
//! /// [LanguageRequester](LanguageRequester).
153+
//! // Get the `Localizer` to be used for localizing this library.
155154
//! #[cfg(feature = "localize")]
156155
//! pub fn localizer() -> Box<dyn Localizer<'static>> {
157156
//! Box::from(DefaultLocalizer::new(
@@ -194,6 +193,8 @@
194193
//! static ref LANGUAGE_LOADER: MyLanguageLoader = MyLanguageLoader::new();
195194
//! }
196195
//!
196+
//! // Get the `Localizer` to be used for localizing this library,
197+
//! // using the provided embeddes source of language files `embed`.
197198
//! pub fn localizer(embed: &'static dyn I18nEmbedDyn) -> Box<dyn Localizer<'static>> {
198199
//! Box::from(DefaultLocalizer::new(
199200
//! &*LANGUAGE_LOADER,

0 commit comments

Comments
 (0)