Generally all the web applications we use would be in English. The language Switching should be supported by all the web applications, so that the user would be comfortable in using the web application in the Language which the user is comfortable.
private static Map<String,Object> countries; static{ countries = new LinkedHashMap<String,Object>(); countries.put("English", Locale.ENGLISH); //label, value countries.put("French", Locale.FRENCH); } public Map<String, Object> getCountriesInMap() { return countries; } public void countryLocaleCodeChanged(ValueChangeEvent e){ String newLocaleValue = e.getNewValue().toString(); //loop country map to compare the locale code for (Map.Entry<String, Object> entry : countries.entrySet()) { if(entry.getValue().toString().equals(newLocaleValue)){ FacesContext.getCurrentInstance() .getViewRoot().setLocale((Locale)entry.getValue()); } } }