t_fmt

Function t_fmt 

Source
pub fn t_fmt(app: &AppState, key: &str, args: &[&dyn Display]) -> String
Expand description

What: Get a translation with format arguments.

Inputs:

  • app: AppState containing translation maps
  • key: Dot-notation key
  • args: Format arguments (as Display trait objects)

Output:

  • Formatted translated string

Details:

  • Replaces placeholders in order: first {} gets first arg, etc.
  • Supports multiple placeholders: β€œ{} and {}” -> β€œarg1 and arg2”