BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe Exam AD0-E720 Topic 7 Question 28 Discussion

Actual exam question for Adobe's AD0-E720 exam
Question #: 28
Topic #: 7
[All AD0-E720 Questions]

An Adobe Commerce developer is working on a custom knockout Ul component and they need to add the text Happy Birthday. to be translated inside an .html template.

How would the developer add the text?

Show Suggested Answer Hide Answer
Suggested Answer: B

To add the text Happy Birthday. to be translated inside an .html template, the developer should use the i18n binding. This binding allows the developer to specify the text as a string literal and translate it using the Magento translation mechanism. For example:

<span data-bind=''i18n: 'Happy Birthday.'''></span>

This will render the text as it is, or translate it if a translation file is available for the current locale. The i18n binding can also accept variables or expressions as arguments. For example:

<span data-bind=''i18n: name + ' Happy Birthday.'''></span>

This will render the text with the value of name variable, or translate it if a translation file is available for the current locale. The Mil8n and il8n bindings are not valid and will not work, as they are misspelled and do not match the knockout binding syntax. Reference: [Knockout bindings], [i18n binding]


Contribute your Thoughts:

Jamal
29 days ago
I'm glad I studied up on my knockout UI component knowledge for this exam. Option C is the way to go.
upvoted 0 times
...
Vincent
1 months ago
Haha, I bet the developer was feeling a bit 'knocked out' trying to figure this one out!
upvoted 0 times
...
Louisa
1 months ago
Option A looks close, but the property name is 'i18n', not 'Mil8n'. Option B is missing the quotes around the translation key.
upvoted 0 times
Beula
6 hours ago
C)
upvoted 0 times
...
Angelyn
1 days ago
B) Option A looks close, but the property name is 'i18n', not 'Mil8n'.
upvoted 0 times
...
Belen
21 days ago
A)
upvoted 0 times
...
...
Mitsue
1 months ago
I'm not sure, but I think option C could also work because it uses knockout syntax.
upvoted 0 times
...
Sabra
2 months ago
I agree with Melodie, option A seems like the correct way to add the text.
upvoted 0 times
...
Melodie
2 months ago
I think the developer should choose option A.
upvoted 0 times
...
Lettie
2 months ago
I think the correct answer is option C. The data-bind attribute is used to bind the translation key to the component, and the syntax is the proper way to use knockout translation.
upvoted 0 times
Geraldine
20 days ago
Great job on knowing the correct way to add translated text in the custom knockout Ul component!
upvoted 0 times
...
Irma
22 days ago
That makes sense. It's important to use the proper knockout translation syntax in .html templates.
upvoted 0 times
...
Vincent
27 days ago
Yes, you are right. The syntax is the correct way to add the text for translation.
upvoted 0 times
...
Dierdre
1 months ago
I think the correct answer is option C.
upvoted 0 times
...
...

Save Cancel