Localization in Java Class
Hi all,
I have localization in my jspx pages with two PortalBundle.xlf & PortalBundle_fr.xlf files. It works fine. I use an ApplicationBean.java and a CustomPhaseListener.java classes. To call them, I use this variable set in the jspx pages:
<c:set var="portalBundle" value="#{adfBundle['portal.PortalBundle']}"/>
and this line to have the correct text:
<af:outputLabel value="#{portalBundle.LANGUAGE}"/>
In the project properties panel, I have set the ressourceBundle to portal.PortalBundle
But now I make modification on this label and I want to access the portalBundle from a java class. I have tried with these solutions:
ResourceBundle res = ResourceBundle.getBundle("PortalBundle");
String textEmployee = res.getString("LANGUAGE");
But the application cannot locate the ressourceBundle... and it takes my default locale instead of the locale of the ApplicationBean.
Thanks for your help!
PS: I used this video tutorial to localize my jspx pages: http://www.youtube.com/watch?v=ha6FzOkVc24