users@jsr311.java.net

Languages that are not Locale

From: Reto Bachmann-Gmür <reto_at_gmuer.ch>
Date: Wed, 15 Oct 2008 14:06:52 +0200

java.util.Locale "represents a specific geographical, political, or
cultural region", languages in HTTP (and in RFC 4646) are not exactly
the same, so in some cases a language cannot be mapped to a Locale (such
as "i-klingon" or language with only a 3-letter code). I guess the api
for HttpHeaders should define what do do with such languages, and
suggest getLanguage() returns null qnd getAcceptableLanguages() an
iterator without the languages that cannot be represented as Locale. Or
should an issue be raised against java.util.Locale?

Reto