Description
Change the language to a specific one. Labels, the txt function family, as well as the txt function will respect this. Return back to initial languge, by passing nothing.
Examples
[% // Send an email in customer's language independent of the user's language.
lang($customer->get_language()->get_iso_code());
email(
to: $customer->get_email(),
subject: txt("invoice"),
text: php("invoice.txt.php", $context)
);%]
|
Parameters
Coding name |
lang
|
Description |
The two letter ISO code, e.g. en, fr, de.
|
Position |
1
|
Type |
|
|