xiCO2k / laravel-vue-i18n

Allows to connect your `Laravel` Framework translation files with `Vue`.
MIT License
621 stars 51 forks source link

Support for html in translation strings #114

Closed jezzdk closed 1 year ago

jezzdk commented 1 year ago

Some of my translation strings contain html, but when the strings are displayed the html breaks. This is because the "/" characters are replaced with ".".

Example:

<div v-html="$t('Hello <strong>:name</strong>!', { name: 'World' })" />

outputs:

<div>Hello <strong>World<.strong>!</div>

Is there a way to circumvent this behavior? (without removing the html from the translations...)

xiCO2k commented 1 year ago

Thanks for the issue, will take a look on this.