取得local信息,是日本的就推出

解决方案 »

  1.   

    unicode编码应该包括上述语言把!
    你可以local对象的getCountry方法取得在那个国家来判断
      

  2.   

    不看
    有经验的朋友能不能给我看下代码
    就是直接
    boolean on_blacklist()
    {
      String XXX=楼上说的getCountry(); 关键这句,和怎么判断,谢啦。
      switch (XXX)
    {
    case "Japan":
    case "Indonesia"
    case ....return true;
    }
    return false;
    }
      

  3.   

    明明是叫Locale,楼上几位... Locale.getDefault()
    没明白你要做什么,国际化的话用 java.util.ResourceBundle
      

  4.   


    http://blog.csdn.net/listeningsea/article/details/6613715
    Locale[] locales = Locale.getAvailableLocales();  
    for( Locale locale : locales ){  
        System.out.print( locale.getDisplayCountry() + "=" + locale.getCountry() );  
        System.out.println( "\t\t\t\t\t\t\t" + locale.getDisplayLanguage() + "=" + locale.getLanguage() );  
    }  我的引用如下import java.util.Locale;String nation=Locale.getDefault().getCountry();
    String language=Locale.getDefault().getLanguage();switch (language)
    {
    case "ja"://日文猪
    case "tr"://土耳其猪
    case "in"://印尼猪
    case "ar"://阿拉伯猪
    }