intlify / vue-i18n

Vue I18n for Vue 3

Home Page:https://vue-i18n.intlify.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow new lines in translation

IndexOutOfMJ opened this issue · comments

Clear and concise description of the problem

If you have a message that is quite long and you want to add linebreaks in that message there is no option to do that.

Suggested solution

Add support for \n in translations

Alternative

Something like %newline% maybe

Additional context

No response

Validations

@IndexOutOfMJ
I feel the same way. Now it is surpassed by the following

 "message": "Hello, \nworld"
<p style="white-space: pre-wrap;">{{ $t("message") }}</p>

@IndexOutOfMJ

I feel the same way. Now it is surpassed by the following


 "message": "Hello, \nworld"

<p style="white-space: pre-wrap;">{{ $t("message") }}</p>

Yeah that's the only way to do it currently but I. Think that could be more beautiful