Re: international language support
- Posted by Irv Mullins <irvm at ellijay.com> Aug 16, 2001
- 462 views
On Thursday 16 August 2001 11:14, freeplay at mailandnews.com wrote: > Parsing isn't the issue with NLS. NLS is a way to help you code an > application once (single source) and have it run in as many different > languages you have the time to translate a message catalogue into. Not > sure if it handles reading text right to left. I guess you just put the > message text in the catalog right to left. The other biggie is character > sets. Parsing would be an issue if keywords were translatable. If you look at any number of Linux programs which can run in multiple languages, you'll see that the source code still uses "English-ish" keywords. Lots of if () printf(), etc. I think Logo has been translated into French. and Applescripts worked when written in French. > I've never coded anything with NLS so I'm no expert. I'd guess, however, > that the format of a message catalogue has an "english" feel to it though Pretty much the same thing could be done in Euphoria with simple include files: msg.en msg1 = "File not found" msg2 = "Cannot read file" msg.es msg1 = "Fichero no encontrado" msg2 = "No puede leer el fichero" (Apologies for the poor spanish) Just include the desired msg.xx file for your language. The advantage would be that anyone, not just a programmer, who can read one of the existing msg. files could easily translate that into a new msg. file in her native language, and your program would be usable. One disadvantage might be extra work for the programmer, having to keep track of all the msg id's, and always using them instead of just typing the text in directly. A pre-processor might be able to solve this, by scanning the finished code, extracting and creating a list of all the unique strings, saving that list to a msg. file, and then replacing those strings in the source with the msg1 .... msg2... etc. pointers. Of course, this doesn't help much with the other problems, such as the translated string being much longer than the original, English => German, for instance. Regards, Irv