Discussion
This section describes C language functions that
you can use to write SCO OpenServer applications that
will process input and generate output in a user's native language
or cultural environment.
It shows you how to use these functions and some
associated commands to create programs that make no assumptions about
the language environments in
which they will be run, and so are portable
across these environments.
The basic idea behind the internationalization
interface is that at any time a C program has a current ``locale'':
a collection of information on which it relies
for language- or culture-dependent processing.
This information is supplied by implementations
and seen by the program only at run time.
Because the information is stored externally to the program, applications need not make -- and should
not make if they mean to be portable -- any assumptions about
-
the code sets used by the implementation in
which they are executed.
The 7-bit US ASCII code set, for example, cannot
represent every member of the Spanish character set;
the 8-bit code sets used for most European languages
cannot represent every ideogram and phonogram in
the Japanese language.
-
the cultural and language conventions of the application's users.
The same date is formatted in the United States as 6/14/90, in
Great Britain as 14/6/90, in Germany as 14.6.90.
Similar problems arise in formatting numeric and monetary values.
By language conventions we mean, for instance, that the
sharp s in German is collated as ss;
the character ch in Spanish
collated after all other character sequences starting with c.
-
the language of the messages in
which the program communicates with the user.
Interactive applications in an English-speaking setting usually will
query users at some point for a yes
or no response; in a German-language
setting the responses will be ja or nein; in a
French one oui or non.
Program error messages will differ much more
widely than that across languages: File not found,
Fichier inexistent, and so on.
A typical locale, then, consists of an encoding scheme;
databases that describe the conventions appropriate
to some nationality, culture, and language;
and a file which you supply,
that contains your program's message strings in whatever
language the locale implements.
Next topic:
Organization
Previous topic:
Internationalization
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005