How to put HTML elements in translations?
See original GitHub issueThis will print out <br />
instead of a linebreak:
module.exports = {
en: {
index: {
headline: 'Testing html <br /> with i18n'
}
}
}
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
Using HTML's translate attribute - W3C
HTML5 has a list of attributes that are to be translated by default, but these attributes should not be translated if they are...
Read more >How to translate HTML with examples - Lokalise Blog
Sample HTML Page to Translate · First, it is important to make sure all tags and their attributes have translations. · Also, you'll...
Read more >HTML tags in i18next translation - Stack Overflow
In order to make this work, you have to prefix the data-i18n attribute of the elements you want to translate with [html] :...
Read more >translate - HTML: HyperText Markup Language | MDN
The translate global attribute is an enumerated attribute that is used to specify whether an element's translatable attribute values and its ...
Read more >HTML translate Attribute - W3Schools
The translate attribute specifies whether the content of an element should be translated or not. Test: Use the Google translate box (at the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If you wrap the translation in 3 brackets like:
it does actually render the HTML correctly. But is it good practise to do that?
What would also be great would be able to render functions like v-link and @click. For example say I have the below json:
It doesn’t render the v-link right now. Is this something you could implement?
As always, thanks