Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!agate!linus!linus!mingus!john From: john@mingus.mitre.org (John D. Burger) Newsgroups: comp.lang.misc Subject: Re: Internationalization [was Re: Printing plural forms.] Message-ID: <1991Feb27.161925.8675@linus.mitre.org> Date: 27 Feb 91 16:19:25 GMT Sender: news@linus.mitre.org (News Service) Organization: The MITRE Corporation, Bedford, MA 01730 Lines: 38 Nntp-Posting-Host: mingus.mitre.org daw@cbnewsh.att.com (David Wolverton) writes: >> [discussion of pluralization deleted] >As an addendum to this discussion, you might consider how these sorts >of problems occur when a program is internationalized (that is, converted >into another language) (that is, a human language other than English). >A truly "world class" (pun intended) programmer will consider such >issues during development. >Assuming that you pull the 1st argument out into a #define in a header >or a text file somewhere, at least the following other issues come up: > 1. How to print the correct currency symbol? > 2. How to format values > 999? > 3. How to format the date? > 4. Whether, in a language other than English, would > the message read more sensibly with the second and > third printf() arguments reversed? Acting as a Lisp gadfly, my response would be "Too bad you don't program in a language with a real object system, in which the solution would be to have dates, currency amounts and so forth each know how to form their own printed representation. One would then have subtypes of DATE such as EUROPEAN-DATE, and subtypes of CURRENCY-AMOUNT such as RUBLE, DUETSCH-MARK and DOLLAR." Such an implementation has other wins as well. For instance, if currency amounts are represented as numbers, it gets very inconvenient to represent $19.99. Of course, one often wants more light-weight representations of such things, in which case the appropriate thing to do is program in an object-oriented manner even if you don't use explicit objects. -- John Burger john@mitre.org "You ever think about .signature files? I mean, do we really need them?" - alt.andy.rooney