import java.io.UnsupportedEncodingException; import java.util.Locale; public final class ForeignTextDemo { public static void main(String[] args) throws UnsupportedEncodingException { Locale locale = new Locale("TW"); System.out.println(locale.getDisplayLanguage(Locale.TRADITIONAL_CHINESE)); locale = new Locale("CN"); System.out.println(locale.getDisplayLanguage(Locale.SIMPLIFIED_CHINESE)); } }
When I run the program above, I get the following output:
ε₯ηΆζcn
But, if I change the second language to locale = new Locale("ZH"); , I will get the desired result:
ε₯ηΆζδΈζ
Why is this? I really want the simplified Chinese language display language . Is this βZHβ exactly that?
source share