Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
break line in locale text used in components vue

I am using locales for texts in my vue app and these texts need to have break lines in the in certain places. I have tried \n\ and <br> tags but they don't work. How can I go about breaking locale i18n text lines and use them in my components?

For example, the following text should go to a new line after "home is" and "heart is or"

locales/en.json:

"description": {
   "home": "home is \n where the heart is or <br> another random cliche sentence here"
}

components/hello.vue:

<div> {{$t("description.home")}}</div>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You can use the v-html directive to show it:

<div v-html="description.home"></div>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!