Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!snorkelwacker!paperboy!news From: news@OSF.ORG (USENET News System) Newsgroups: comp.lang.c Subject: Re: Internationalisation, setlocale() Message-ID: <7513@paperboy.OSF.ORG> Date: 3 May 90 12:36:44 GMT References: <11071@cbmvax.commodore.com> Reply-To: martin@osf.org (Sandra Martin) Organization: Open Software Foundation Lines: 51 From: martin@osf.osf.org (Sandra Martin) Path: osf!martin You're right that the examples are confusing, and not entirely appropriate. The problem is that there are no current standards for locale names or for the way locale information should be organized. Most implementations that I know of use some form of the X/Open naming recommendation which consists of three parts: language_territory.codeset At this point, however, there is no agreement about the contents of the individual parts. For example, some implementations might use "long" country names for the the territory segment (e.g., canada, germany), while others use abbreviations (can, ger). Still others use the nationality rather than the country name (e.g., using "swiss" rather than "switzerland"). There are many, many other examples of different approaches. As for your question about how the locales should be organized, again, it isn't standardized, and so depends on the implementation. There are two fairly popular approaches: flat and tiered. With the flat approach, information is stored something like this .../locale// With the tiered approach, information is stored something like this: .../locale//// In the tiered approach, the territory and codeset directories are optional and therefore might not exist. You noted that some locale-related info is language-specific, while other info is country-specific. Notice that neither the flat nor tiered approach makes these kinds of distinctions. Some implementations do have separate files for language- and country-specific info, but they store them together in the same directory. Confused? I wouldn't be surprised if you were. I've thought for a long time that it would be a good idea to have some standards for locale names, but have been voted down in a couple of different groups. However, lately there have been some rumblings about the confusion inherent in the current chaotic system, so we may see some standards soon. Standards for the organization of locale info also would be helpful. Hope this helps. -- Sandra Martin Open Software Foundation email: martin@osf.org tel: (617) 621-8707