How to add locale for Arabic

后端 未结 1 671
青春惊慌失措
青春惊慌失措 2021-01-14 07:05

I was trying to build multi-language website using JSF 2.0 using this tutorial

But I am facing at this line

countries.put(\"English\", Locale.ENGLISH         


        
相关标签:
1条回答
  • 2021-01-14 07:41

    You have to use this

    countries.put("Arabic", new Locale("ar", "DZ"));
    //or just language name for generic Arabic
    new Locale("ar"); 
    

    Where the first pair of letters means language and the second is country (region) - Algeria in this case. You can use this link as a reference for the list of available countries and locales (I know, Roseindia sucks but this list seemed to me very useful).

    0 讨论(0)
提交回复
热议问题