translate(key: string, values: table<string, any>): string
Modifier: static
Note: @nodiscard - Return value should not be ignored
Translates a key to the current language. The key is used to look up the translation in the current language, if the key dosn't exist, the key itself is returned. in the translation. Placeholders can be in the form of `$lua_expression$` for Lua expressions and `{key}` for values from the table.
Parameters:
- key (string): the key of the translation to translate.
- values (table<string, any>): replacement values to use for the placeholders
Returns: translated the translated and formatted string