From 1cb7ed65d7b4005537037bd60ddf58f648c2debe Mon Sep 17 00:00:00 2001 From: Terry Raimondo Date: Wed, 9 Oct 2019 17:43:15 +0200 Subject: [PATCH] Woops --- README.md | 6 +++++- src/lib.rs | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a05df75..0b3c32b 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,11 @@ the files must look like this: Any number of languages can be added, but you should provide them for everything since it will panic if a language is not found when queried for a key. -In your app, jsut call the `t!` macro +In your app, just call the `t!` macro ```rust +use internationalization::t; + fn main() { let lang = "en"; let res = t!("err.not_allowed", lang); @@ -51,6 +53,8 @@ You can use interpolation, any number of argument is OK but you should note that To use variables, call the `t!` macro like this: ```rust +use internationalization::t; + fn main() { let lang = "en"; let res = t!("err.user.not_found", email: "me@localhost", id: "1", lang); diff --git a/src/lib.rs b/src/lib.rs index 53dc8af..e36565b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -66,6 +66,8 @@ //! To use variables, call the `t!` macro like this: //! //! ```rust +//! use internationalization::t; +//! //! fn main() { //! let lang = "en"; //! let res = t!("err.user.not_found", email: "me@localhost", id: "1", lang);