Research and ideas

Localisation

A project I'm working on will be presented to the customer in a non-English language. For maintenance, this could prove problematic as it will be unfamiliar. I'm working around the ASP.NET code using resource files and the ResourceManager class which is working well. That leaves me with the problem of javascript, and how to localise it. The javascript will not change very often, and for the moment I've just gone with my basic solution - if necessary code 2 different versions of the javascript and have an entry in the resources file which relates to the name of the javascript file to use. I've discussed a couple of options with a few people, and this represents a work in progress of other ways to resolve this "more cleanly"

  1. Basic - 2 javascript files, one per language - duplicate functionality
  2. Literals - 3 javascript files - one per language, plus one with functionality
  3. A self detecting piece of javascript that works out the locale from some setting and thus includes the appropriate literals file (or other data store method) dynamically
  4. A method using a better form of data store than variables

Note: the pages below this are just proof of concept so there is no visual styling whatsoever!