eg. to translate "> New Alarm", "> Save" and "> Back" in alarm.js to german and other languages?
We have locale.lang, but using this naivly would mean to include all language strings in the .js file, which might be bad for memory...
Would it be better to put the strings in a json file, read the file on startup, take only the current language strings and throw away the rest?
Or one json file per language?
Any other ideas to optimize this?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
eg. to translate "> New Alarm", "> Save" and "> Back" in alarm.js to german and other languages?
We have locale.lang, but using this naivly would mean to include all language strings in the .js file, which might be bad for memory...
Would it be better to put the strings in a json file, read the file on startup, take only the current language strings and throw away the rest?
Or one json file per language?
Any other ideas to optimize this?