Change language

translator.html

This macro defines functions for custom translation.

get

This method will search the TOML file containing translation for each language set in the config. The folder to search is base on the config.extra.tr_path. By default, it's langs. Directory searching is as follows:

This macro has the following properties to pass:

Example:

{%- import "macros/translator.html" as tran -%}
{%- set translated = tran::get(language = "my", key = "test", def = "Testing") -%}
{{test}}