0

I have 3 json files for translations. I want to translate this message: "ERROR_MESSAGE": "Verification failed, %s tries left.".

I am using sprintf package, and when I load the string it doesn't change the value dynamically. The % sign shouldn't be escaped, so it would work in my opinion.

sprintf(loadedString, [remainingTries]);
Arinton Akos
  • 145
  • 2
  • 10
  • Exactly what is `loadedString`? What is the result of `sprintf`? (The code you've shown doesn't seem to do anything with the resulting string.) Can you provide a minimal, reproducible example? – jamesdlin Apr 12 '22 at 18:30

1 Answers1

0

You could either use:

sprintf(loadedString, [remainingTries.toString()]);

or change %s to %i.