Java I18n capability is amazing.
Supported locales works perfect:
Locale ar = new Locale("ar","SA");
System.out.println(ar.getDisplayName(ar));
outputs: العربية (السعودية)
But for not supported locales like Kazakh language, language name is displayed in same lang will output in Enlish(Standard), as written in Java Spec.
Locale locale = new Locale("kk","KZ");
System.out.println(kk.getDisplayLanguage(kk));
outputs: Kazakh (Kazakhstan)
I’m trying to solve this problem, last code has to output like this: Қазақша (Қазақстан).
Anybody knows solution?
Any guesses (or ways to contact with Java SE developer, or with who know algorithms) I will note as answer 😉
Thank you!
Assuming that you run on Windows, you need to change the locale in the OS Regional Settings.
Please see this link. (On win 2000 Kazakh appears, however, on win 7 it does not appear in the list…). On linux you can set the locale with the localedef utility.
Good Luck!