Supporting many human languages.

Richard A. O'Keefe ok at goanna.cs.rmit.oz.au
Tue Jul 3 15:52:40 AEST 1990


In article <1990Jul2.205752.2317 at mmm.serc.3m.com>, us269574 at mmm.SERC.3M.Com (Darryn J. Kozak) writes:
> I need to support a software product to be used in different countries.
> I am looking for suggestions on ways to support multiple human languages
> for this system. The software in written in C and will run on UNIX boxes.
> 
> I am most interested in ways to store the different text strings and
> switch between them. Does anyone have some ideas or recommendations for
> doing this?

Find a good technical bookshop and get the X/Open stuff.
National(?) Language Support is covered by that, and the interface
they recommend is supported by several UNIX systems (HP-UX, AIX, others).
SVR4 is different, though.

However, THERE IS NO MAGIC BULLET.
It's not really a good idea to think in terms of storing text strings.

The thing for you to do is to construct "message objects"
(pointers to unions, say) that contain all the information that you
want to present, and pass these message objects to a message display
procedure.  That message display procedure can use NLS_printf() and
the like if they're available, or it can use the SVR4 machinery, or
it can be a giant switch(), the point is that the rest of your program
shouldn't know or care.  And keep the number of error categories SMALL.
-- 
Science is all about asking the right questions.  | ok at goanna.cs.rmit.oz.au
I'm afraid you just asked one of the wrong ones.  | (quote from Playfair)



More information about the Comp.unix.questions mailing list