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

169
Visualizações
put i18next value inside variable JS

I have a JS code that changes the text after some time and I want to use i18next translations in that to make the words "performance, flexibility" etc.. be in more than 1 language. the idea I had to solve this was putting the i18next value inside a variable and substitue the words in the JS code with the variables. but I don't know how to use i18next to put his translated words inside a variable, if someone could help me I would be very grateful!

Json files

en-US

"index" : {
    "performance" : " performance",
    "flexibility" : "flexibility"
}

pt-PT

"index" : {
    "performance" : " Desempenho",
    "flexibility" : "Flexibilidade"
}

JS code

var typed1 = new Typed('#typed1', {
    strings: ["performance", "flexibility", "scalability."],
    typeSpeed: 50,
    backSpeed: 20,
    smartBackspace: true,
    loop: true
});
var typed1 = new Typed('#typed2', {
    strings: ["Protection", "Sophisticated", "Flexibility"],
    typeSpeed: 100,
    backSpeed: 50,
    smartBackspace: true,
    loop: true
});
about 4 years ago · Juan Pablo Isaza
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