I've been working with Thraex on the translations of my PRTSCR program to French and Turkish. I want to thank Thraex for volunteering, and am still working through the technical details on implementation. I've ran into a few items that I would like some opinions on how to handle them. These have implications for other DOS programs and even DOS itself.
First of all, my understanding is that the "official" way to declare a language is through the LANG environment variable. I'm planning on accepting either the two- or three-letter language abbreviations from the 639-1, 639-2/T, or 639-2/B columns listed on the following web page: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes Obviously, I'm only going to implement languages for which I have translations. In addition, I am going to check to make sure the Code Page is correct. For example, even if the LANG environment variable is set to FR, FRA, or FRE but the Code Page is not 850 or 858, I think it is safe to assume the LANG environment variable is incorrect and will write in English instead of French even though LANG says I shouldn't. I also want to be able to handle the situation where LANG is not set but still be able to make an "educated guess" about the users language and not just always assume English. DOS does not internally store the language, but instead stores three items that are indirectly related to language: Country, Keyboard Layout, and Code Page. For example, if the Country is set to France and the Keyboard Layout is one of the French ones (I know there are at least two) and the Code Page is 850 or 858, I think it is safe to assume the language is French even if LANG doesn't exist. I also know there are some keyboard layout programs that don't report themselves at all, and that could potentially throw an additional wrinkle into things. The problem with this approach is something like Belgium. Somebody correct me if I'm wrong, but Belgium does not have its own language -- some parts of the country are French and other parts are German. There is a Belgian country code and a Belgian keyboard layout (which I think is a "hybrid" between French and German). If everything points to Belgium but LANG isn't set, I'm not sure the right thing to do is write messages in English even though that's the only logical thing to do. A "super-override" option would be to add a command-line switch to indicate the language to use for messages which would ignore all the automatic language-detection methods. Comments/suggestions/ideas/insults? _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel