Last week a friend asked an interesting web-based localization question. He surprised me with it. I wish that I had considered it before, but I had not. In my less than complete analysis of his problem, I found a solution, but I don’t know if he’ll like it. Hell, I barely like it myself, but it’s what I came up with quickly.
Here’s the question:
So here are a couple options:
Then, of course, in your Japanese HTML file, you’d have this:
localizedStrings object with all the needed localized text strings. Not to bad, not bad at all.
Although they aren’t shown here, resource bundles hold the localized text — one bundle for each language.