Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!corton!ilog!grenelles!davis From: davis@grenelles.ilog.fr (Harley Davis) Newsgroups: comp.lang.misc Subject: Re: Internationalization [was Re: Printing plural forms.] Message-ID: Date: 4 Mar 91 17:42:04 GMT References: <1991Feb19.104810.549@ZYX.SE> <3331.27c23984@iccgcc.decnet.ab.com> <3433.27ca3674@iccgcc.decnet.ab.com> <1991Feb26.224900.2283@cbnewsh.att.com> Sender: davis@ilog.fr Organization: ILOG S.A., Gentilly, France Lines: 38 In-reply-to: daw@cbnewsh.att.com's message of 26 Feb 91 22:49:00 GMT In article <1991Feb26.224900.2283@cbnewsh.att.com> daw@cbnewsh.att.com (David Wolverton) writes: [Messages in programs in multiple languages] I'm not aware of any other vendor that has attacked this issue. Because of its international market and origins in a (ahem) non-standard CS language, ILOG, Europe's largest Lisp vendor, has had to address this issue in Le-Lisp. The solution is simple, but so far has been effective. Instead of putting constant strings in messages, a message object is referenced. The message object provides translations of the object into several languages. At runtime, several languages can be simultaneously loaded, and a current one selected. Alternatively, languages need not be loaded into particular applications; this decision can be made at link or runtime. eg: (defun foobar (x) (assert (and (fixp x) (>= x 0)) (error #M:argument-not-natural x)) ...) (defmessage :argument-not-natural (english "Argument not a natural") (french "L'argument n'est pas un entier positif") (german "Ich nicht haben ein idea how to sprechen this in deutsch")) More complicated permutations can be made by writing specialized functions which are conditionalized on the current language. -- Harley Davis -- ------------------------------------------------------------------------------ nom: Harley Davis ILOG S.A. net: davis@ilog.fr 2 Avenue Gallie'ni, BP 85 tel: (33 1) 46 63 66 66 94253 Gentilly Cedex, France