New Year Sale 2026! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Adobe AD0-E720 Exam - 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:

0/2000 characters
Kallie
3 months ago
C just makes more sense for translations!
upvoted 0 times
...
Evan
3 months ago
Definitely not A, that syntax is off.
upvoted 0 times
...
Zona
3 months ago
Wait, is it really that simple?
upvoted 0 times
...
Erasmo
4 months ago
I think B looks better, though.
upvoted 0 times
...
Alfred
4 months ago
Option C is the correct way to do it!
upvoted 0 times
...
Dannette
4 months ago
I believe it’s definitely 'il8n' for translations, but I can't recall if we need to use the span tag or something else entirely.
upvoted 0 times
...
Veta
4 months ago
I’m a bit confused about the syntax. Shouldn't the translation key be wrapped in quotes?
upvoted 0 times
...
Vanna
4 months ago
I remember practicing a similar question where we had to use the knockout bindings for translations. I feel like option C looks familiar.
upvoted 0 times
...
Marnie
5 months ago
I think the correct way to bind the translation is with the data-bind attribute, but I'm not sure if it's 'il8n' or 'Mil8n'.
upvoted 0 times
...
Anglea
5 months ago
I'm a little confused by the different options, but I think I'll go with option B. The syntax seems cleaner and more straightforward.
upvoted 0 times
...
Sylvie
5 months ago
I'm confident that option A is the right approach here. The data-bind attribute looks correct for adding the translated text.
upvoted 0 times
...
Blythe
5 months ago
Okay, let me think this through. I believe option C is the way to go, using the Knockout.js comment-based syntax for i18n.
upvoted 0 times
...
Tonette
5 months ago
This looks straightforward, I think option B is the correct way to add the translated text.
upvoted 0 times
...
Whitney
5 months ago
Hmm, I'm a bit unsure about this one. I'll need to double-check the syntax for the data-bind attribute in Knockout.js.
upvoted 0 times
...
Jamal
1 year 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 year ago
Haha, I bet the developer was feeling a bit 'knocked out' trying to figure this one out!
upvoted 0 times
...
Louisa
1 year 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
1 year ago
C)
upvoted 0 times
...
Angelyn
1 year ago
B) Option A looks close, but the property name is 'i18n', not 'Mil8n'.
upvoted 0 times
...
Belen
1 year ago
A)
upvoted 0 times
...
...
Mitsue
1 year ago
I'm not sure, but I think option C could also work because it uses knockout syntax.
upvoted 0 times
...
Sabra
1 year ago
I agree with Melodie, option A seems like the correct way to add the text.
upvoted 0 times
...
Melodie
1 year ago
I think the developer should choose option A.
upvoted 0 times
...
Lettie
1 year 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
1 year ago
Great job on knowing the correct way to add translated text in the custom knockout Ul component!
upvoted 0 times
...
Irma
1 year ago
That makes sense. It's important to use the proper knockout translation syntax in .html templates.
upvoted 0 times
...
Vincent
1 year ago
Yes, you are right. The syntax is the correct way to add the text for translation.
upvoted 0 times
...
Dierdre
1 year ago
I think the correct answer is option C.
upvoted 0 times
...
...

Save Cancel