[comp.lang.c] Supporting many human languages.

us269574@mmm.SERC.3M.Com (Darryn J. Kozak) (07/03/90)

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?

Thanks,

        Darryn Kozak

        3M Center
        260-4A-08
        St. Paul, MN 55144

        phone:          612-733-3271
        email:          us269574@mmm.3m.com or kozak@umn-cs.edu
        FAX:            612-737-3213

ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) (07/03/90)

In article <1990Jul2.205752.2317@mmm.serc.3m.com>, us269574@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@goanna.cs.rmit.oz.au
I'm afraid you just asked one of the wrong ones.  | (quote from Playfair)

etxtorn@juno11.ericsson.se (Thomas Tornblom TM/JU 99367) (07/03/90)

In article <1990Jul2.205752.2317@mmm.serc.3m.com> us269574@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?
....

Check the MNLS stuff from AT&T.

Thomas

ry@cbnewsl.att.com (ryerson.schwark) (07/03/90)

In article <3366@goanna.cs.rmit.oz.au> ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) writes:
>In article <1990Jul2.205752.2317@mmm.serc.3m.com>, us269574@mmm.SERC.3M.Com (Darryn J. Kozak) writes:
>> I need to support a software product to be used in different countries.
>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.
>

Yes, SVR4 is different because in addition to european languages
and x/open conformance, we also support Asian languages which require
multibyte character handling.  If you're interested in handling
asian languages, I strongly suggest you look at SVR3/4.


Ry Schwark
ry@uso.att.com