Magento
M70-301 · Question #59
Using Magentos JavaScript translator object, which is the correct option for translating JavaScript strings within a.phtml file?
The correct answer is D. Translator-add({"To be translated":"<?php echo $this->_('To be translated'); ? >"}). See the full explanation below for the reasoning.
Question
Using Magentos JavaScript translator object, which is the correct option for translating JavaScript strings within a.phtml file?
Options
- ATranslator.newTranslation({"To be translated":"Translated Copy Here"});
- BTranslator.add("To be translated");
- CTranslate({"To be translated","<?php echo $this->__(`To be translated'); ?>"});
- DTranslator-add({"To be translated":"<?php echo $this->_('To be translated'); ? >"});
How the community answered
(52 responses)- A4% (2)
- B10% (5)
- C2% (1)
- D85% (44)
Community Discussion
No community discussion yet for this question.