Internationalisation, setlocale()

Michael Meissner meissner at osf.org
Tue May 8 01:03:49 AEST 1990


In article <14535 at frog.UUCP> barr at frog.UUCP (Chris Barr) writes:

| In article <11071 at cbmvax.commodore.com>, valentin at cbmvax.commodore.com (Valentin Pepelea) writes:
| 
| > The ANSI C function setlocale() allows the programmer to set the locale to
| > be used in localised functions. As examples we are given
| > 
| > /usr/lib/locale/german/LC_MESSAGES/		contains message catalogues
| >                       /LC_COLLATE               collation (sorting) information
| >                       /LC_TIME                  time & date information
| >                       /LC_NUMERIC               number format infomation
| >                       /LC_MONETARY              monetary symbol & format info
| > 
| > But this is rather confusing. While messages and collation information varies
| > according to language, time format and monetary information is country specific.
| > So how are locale directories supposed to be organised?
| 
| Name directories for BOTH country and language.  
| Files which are the same for different 'locales' might be linked, e.g. messages 
| in switz_french & canada_french.
| e.g.:
|  /usr/lib/locale/switz_german/
|  /usr/lib/locale/switz_french/
|  /usr/lib/locale/canada_french/
|  /usr/lib/locale/canada_english/

Nothing in the locale stuff mandates that a locale be a country,
place, or what have you (though that's how it mostly will be used).
For example, you could have a locale that is used for sorting things
in American Library Order (case insignificant, Mc and Mac at the
beginning of words are considered the same, insignificant words like
'the' not counting in collation), etc.

--
Michael Meissner	email: meissner at osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA

Catproof is an oxymoron, Childproof is nearly so



More information about the Comp.lang.c mailing list