An Adobe Commerce developer has been asked to add text to an email template that supports translations. Which two options would they use during their implementation? (Choose two.)
To add text to an email template that supports translations, the developer should use the {{trans}} directive with the text enclosed in double quotes. For example:
{{trans ''Lorem Ipsum is simply dummy text of the printing''}}
This will render the text as it is, or translate it if a translation file is available for the current locale. If the text contains a variable, the developer should use a placeholder with a percent sign and pass the variable name as an argument. For example:
{{trans ''%items items'' items=''numItems''}}
This will render the text with the value of numItems replacing the %items placeholder, or translate it if a translation file is available for the current locale. The {{translations}} directive is not valid and will not work. Reference: [Translate email templates], [Email template syntax]
Currently there are no comments in this discussion, be the first to comment!