How to extend the list of available Java Locales

Posted by alfonx on Stack Overflow See other posts from Stack Overflow or by alfonx
Published on 2011-01-17T17:48:52Z Indexed on 2011/01/17 17:53 UTC
Read the original article Hit count: 159

Filed under:
|

I am looking for a way to add more Locales to the Locales available in Java 1.6. But the Locales I want to create do not have ISO-3166 country codes, nor ISO-639 language codes. Is there any way to do this anyways? The Locales I want to add only differ in the language names, but the smaller an ethnic group is, the more picky they get about their identity ;-)

So I thought about extending an existing Locale, something like

UserDefinedLocale extends Locale { 
   UserDefinedLocale (Locale parentLocale) {...}
}

but java.util.Locale is final, which makes it especially hard to hack something around...

So, is the idea that the list of Java Locales is exhaustive? Am I the first to miss some more Locales?

© Stack Overflow or respective owner

Related posts about java

Related posts about locale