Skip to main content

t

Function t 

Source
pub fn t(ctx: &Context, key: &str, args: &Args<'_>) -> String
Expand description

The text of key in the context’s language, with Fluent arguments; else the key itself. Without catalogues installed (install or the plugin), the interface’s strings provider answers (or the key shows).

use egui_pop_i18n::{args, t};

let ctx = egui::Context::default();
assert_eq!(t(&ctx, "greeting", &args![name = "Ada"]), "greeting");