From: <ia...@co...> - 2005-11-30 22:02:30
|
>> Subject: RE: [Rails-devel] Help >> >> I just had a chance to look at the help system a little more in-depth. >> >> >At some point we're going to want to separate the text strings from the code. >Perhaps we should generate a global help xml file to hold the text, or maybe a >help directory to hold multiple files, and then also have a game->specific help file for including any game-specific help information. You need to read up on internationalization (aka I18N) and localization (aka L10N). Basically your code ends up referring to property names, which are then looked up in property files for the actual text. Different versions of the props file(s) are provided for each locale, and the user's settings determine which one is used. ISTR the tutorial trail on Suns's Java website explaining the process covered it very nicely, and didn't take long to read. I internationalised a small app in about couple of hours, including reading the tutorial. There's also an Eclipse wizard which helps configure it all for you. I'd advise having a small number of files, probably only one for the base application, rather than one per package (which is the alternative). Also make sure you use Format strings where appropriate so that you can cope with parameters (e.g. company name, currency refs, etc) being in different places in the text in different languages. Iain. |