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

167
Views
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
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!