t

Macro t 

Source
macro_rules! t {
    ($config:expr, $key:expr) => { ... };
    ($config:expr, $key:expr, $($argument_name:literal = $argument_value:literal),* $(,)?) => { ... };
}
Expand description

Translates the specified key in the language specified in the config.

§Parameters

  • config: The config object.
  • key: The key to translate to.
  • arguments: Optional parameter. The arguments to replace. Has to be of type "name" = "value".

§Returns

A String containing the translated value.

§Examples

localizer_rs::t!(config, "test");
localizer_rs::t!(config, "test", "variable" = "content");

§See also