Earlier this week, I added a localization system to K.I.S.A. One could argue that it would be more accurate to call it a translation system, because localization encompasses things other than just switching out the language, but - because I've already become attached to the name - one would be ignored.
Localization has some pretty obvious benefits. While English is the most widely spoken language in the world, translating into other languages will expand the potential reach of your game. Two of my smaller HTML5 games have been translated into other languages, and have performed well, but this is my first experiment with localizing a larger game. It will be interesting to see how it goes!
My shortlist of target languages, which certainly isn't set in stone, includes the following:
The code itself is pretty trivial, almost to the point of not being worth discussing. There is a localization folder, and within that folder are several files named 'en_us.dat', 'es.dat', etc. Each file stores every string used in K.I.S.A in a key-value pair, which are loaded and parsed when the game is loaded. The folder also contains 'en_us.png', 'es.png', etc. which are flag icons. Because these files are stored externally, they can easily be copied and modified to allow end users to add new localizations.