Added t!() macro

This commit is contained in:
ElBe
2023-10-06 07:39:56 +02:00
parent a8fd02158b
commit 163e31bb45
9 changed files with 154 additions and 31 deletions
+5 -4
View File
@@ -5,15 +5,16 @@ fn main() {
println!(
"{:}",
config.t(
localizer_rs::t!(
config,
"error",
vec![("details", "Something went wrong when trying to do stuff")]
"details" = "Something went wrong when trying to do stuff"
)
);
println!(
"{:}",
config.t("success", vec![("balance", "$10"), ("user", "John Doe")])
localizer_rs::t!(config, "success", "balance" = "$10", "user" = "John Doe")
);
println!("{:}", config.t("all", vec![]));
println!("{:}", localizer_rs::t!(config, "all"));
}