i'm using component interpolation as described here but also have some html tags in my translation string for formatting purposes. how should i deal with this?
<i18n
path="description"
tag="p"
:places="{ value1, value2, routerLink }"
/>
the corresponding key in my .yml file look like:
description: Lorem ipsum <nobr><strong>{value1} %</strong></nobr> some more text <nobr><strong>{value2} %</strong></nobr> and some more text. Go to {routerLink} for more info.
Try use v-html directive
<i18n
v-html="description"
tag="p"
:places="{ value1, value2, routerLink }"
/>
An alternative is can be use a computed that interprets HTML entities see this
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With