Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSF Supported Languages from ManagedBeans

I've defined my supported languages in faces-config.xml as follow:

<locale-config>
  <default-locale>fa</default-locale>
  <supported-locale>fa</supported-locale>
  <supported-locale>en</supported-locale>
</locale-config>

How can I access supported locales in a ManagedBean ? e.g. to populate a list with corresponding items.

like image 482
ehsun7b Avatar asked Aug 21 '11 20:08

ehsun7b


1 Answers

FacesContext.getCurrentInstance().getApplication().getSupportedLocales()

like image 172
Aravind Yarram Avatar answered Nov 11 '22 06:11

Aravind Yarram