Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

159
Vistas
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 Respuestas
Responde la pregunta

0

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

<div v-html="description.home"></div>
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda