Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Best way to provide client-side internationalization support to single-page app
1 point by aroberge on Dec 27, 2015 | hide | past | favorite
I have written a single-page web app for people wanting to learn programming. [1] In addition to the English version, there is also a French version [2] and an incomplete Korean version [3]. The main paradigm used is that of "Karel the robot" where programs consists of instructions, such as "move()" given to that robot. Programs can be written using either Python or Javascript, with support for Blockly [4].

Currently, to produce a complete translation, one has to:

1. Write a separate html page 2. Write a separate Javascript file containing message translations of the form translation["key"]="value"

3. Write a Javascript file defining instructions (such as "move()") in the relevant human language.

4. Write a Python file defining instructions (such as "move()") in the relevant human language.

[Given a version of 4, I can write the equivalent version for 3]

5. For completeness, translate the rather extensive (and yet incomplete) documentation [5].

I would like to simplify the steps 1 & 2 by adopting a more standard way of providing translations. Ideally, I would like to have a single page with a language selector as done for Blockly games [6], but having everything done client-side as it is currently done. After looking at all the available libraries/framework, I am a bit overwhelmed. Note that I am a single non-professional developer doing this as a hobby -- so, "learning to use X will increase employability" is completely irrelevant.

Main objective: to make it easier for translators to provide different versions.

Secondary objective: continuing to do everything client-side.

Question: which framework/library would be the most suitable?

[1] http://reeborg.ca/world.html [2] http://reebord.ca/monde.html [3] http://reeborg.ca/world_ko.html [4] https://developers.google.com/blockly/ [5] http://reeborg.ca/docs/en/ [6] https://blockly-games.appspot.com/




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: