This will print out <br /> instead of a linebreak:
module.exports = {
en: {
index: {
headline: 'Testing html <br /> with i18n'
}
}
}
+1
Any update with this? Thanks
If you wrap the translation in 3 brackets like:
{{{ $t("message.hello") }}}
it does actually render the HTML correctly. But is it good practise to do that?
thanks @aaronjpitts.
I think @aaronjpitts solved this. I'm closing this as it's working for me aswell. Thank you!
@sagaio could you re-open the issue ? and consider the issue solved when the documentation has clarified the solution ? I can make a pull request for this one if you want.
Sure. Nice PR!
For the record It's also stated on VueJS offical page: http://vuejs.org/guide/syntax.html#Raw_HTML
@guillaumevincent thanks!
ping @kazupon
@guillaumevincent
Welcome Pull request :smiley_cat:
@kazupon the PR is already done :
What would also be great would be able to render functions like v-link and @click. For example say I have the below json:
{
"message": "This is a message <a v-link="{name: 'linkName'}">with a link</a>"
}
It doesn't render the v-link right now. Is this something you could implement?
As always, thanks
ping @kazupon
@guillaumevincent
Can you send to kazupon/vue-i18n PR please ?
@aaronjpitts
Hmm, :disappointed:
It cannot render the directive as v-link, because it need to compile the directive.
Sorry @kazupon don't understand what I've done :(
here the good pull request : https://github.com/kazupon/vue-i18n/pull/20
Most helpful comment
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