I have a text like this:

To contact us please email us at [email protected], will be waiting!

when the user clicked on the email it will redirect the user to mail link, using phtml i can easily achieve it like this:

 <?= __("To contact us please email us at %1, will be waiting!",'<a href="[email protected]">[email protected]</a>') ?>

but i have trouble on putting this in knockout HTML file, because i don't know if it can support like that, it needs to be translated with this format:

XXXXXXXXX ZZZZZZ VVVVV [email protected]

2 Answers 2


You can use the html binding:

<p data-bind="html: textlink"></p>

Whatever exists in 'texlink' (can be a variable or string) would come translated.


you can follow the below link to translate the word in html file

translation in html file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.