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

465
Vistas
How translate select options with vuejs

I want to translate the options found inside the contract_project_type array,

this is my select code:

<b-form-select
              :options="contract_project_types"
              v-model="form.contract_data.contract_project_type"
              id="contract_project_types"
              :state="validate(form.contract_data.contract_project_type)"

          ></b-form-select>

and my Data is :

data: {
contract_project_types: [
      'digital_work_city',
      'general_company'
      ]
}

i don't know how to translate these two options. I tried to put this.$t('digital_work_city') this.$t('general_company') but it doesn't work

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Try to get $t from the this context when outside of a template.

data() {
    return { contract_project_types: [
      this.$t('digital_work_city'),
      this.$t('general_company')
      ]
    }
}

You may also try

this.$i18n.t('digital_work_city')
over 4 years ago · Santiago Trujillo Denunciar

0

Try this. May be, it hasn't reacted to change a language.

computed: {
    contract_project_types() {
         return [
           this.$t('digital_work_city'),
           this.$t('general_company')
      ];
    }
}
over 4 years ago · Santiago Trujillo 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