ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 19 - AD0-E720 discussion

Report
Export

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.)

A.
{{translations 'Lorem Ipsum is simply dummy text of the printing'}}
Answers
A.
{{translations 'Lorem Ipsum is simply dummy text of the printing'}}
B.
{{translations '%items items' items='numltems'}}
Answers
B.
{{translations '%items items' items='numltems'}}
C.
{{trans 'Lorem Ipsum is simply dummy text of the printing'}}
Answers
C.
{{trans 'Lorem Ipsum is simply dummy text of the printing'}}
D.
{{trans '%items items' items='numltems'}}
Answers
D.
{{trans '%items items' items='numltems'}}
Suggested answer: B, D

Explanation:

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]

asked 02/10/2024
Amirouche Rahani
48 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first