Can I translate text without creating an element?

Posted by Pinki | Updated on

Yes, you can achieve using attribute. Normally you need to wrap a text content with i18n attribute for the translation. But if you don’t want to create a new DOM element just for the sake of translation, you can wrap the text in an element.

Remember that is transformed into an html comment.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers