Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

364
Visualizações
Vue i18n including external JSON's with translations

I'm using Vue-i18n package. In every component i include a JSON file with translations, like this:

// this is a Vue template: home.vue
<i18n src="../locales/pages/home.json"></i18n>

Locally it works fine.

But i'm storing JSON files with translations on another server, so this package won't work if i try to include an external JSON directly:

<i18n src="https://example.com/translations/home.json"></i18n>

Instead, i decided to get the files on the server side (using node), however i've faced an issue when i try to deploy my app in a docker container, because an app needs to be builded with npm run build, all of the files are already bundled in JS files after build, thus i cannot replace these JSON files with my node script.

Does anyone have an idea on how to reach my goal?

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda