Re: natural languages
Re: natural languages
- Subject: Re: natural languages
- From: Douglas Davidson <email@hidden>
- Date: Fri, 25 Apr 2003 12:26:29 -0700
On Friday, April 25, 2003, at 11:53 AM, Devon E Bowen wrote:
Just remember that the AppleLanguages default can contain localization
specifiers in a variety of different formats, and anyone who reads it
directly will have to be prepared to deal with them.
Yeah, I noticed that. But his suggestion actually is the closest
thing to what I need. Are these really a "variety of different
formats" or are they still from ISO 639 which defines languages
using both abbreviations and words? I don't mind getting either
"Dutch" or "nl" as long as I know they are both as defined in ISO
639. Does anyone know?
You should be prepared for "Dutch", "nl", or "nl_NL" to represent
Dutch. In practice the last form listed is used only in cases in which
there really are significant regional variants, e.g. "de_DE" vs
"de_CH", but there is no guarantee that the longer form will not be
used for other languages. Furthermore, although Apple does not do so,
it is possible to use any arbitrary string for a language name, so you
should be prepared for that.
Also, if you do read the AppleLanguages default directly, remember that
it is a default which anyone can muck with; protect yourself against
malformed data. You should check to make sure that the value of the
default is an array, and that the entries in the array are strings.
Douglas Davidson
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.