This content has been marked as final. 
    
Show                 5 replies
    
- 
        1. Re: How to load specific resource bundlebabazs Feb 7, 2010 7:45 PM (in response to khosro_question)You should try the following way: myLocale= new java.util.Locale("en"); SeamResourceBundle.getBundle("messages",myLocale).getString("msg.text");
- 
        2. Re: How to load specific resource bundlekhosro_question Feb 7, 2010 9:08 PM (in response to khosro_question)Hello Balázs, 
 Thanks for your help.
 It works.Khosro 
- 
        3. Re: How to load specific resource bundlerafaelk Apr 11, 2011 6:30 PM (in response to khosro_question)I'm trying to do the same thing, but I'm getting an exception for any tried locale : 
 Exception during request processing:
 Caused by javax.el.ELException with message: java.util.MissingResourceException: Can't find bundle for base name messages, locale enHere's a sample code where it fails: 
 Locale locale = new Locale("en");
 ResourceBundle bundle = SeamResourceBundle.getBundle("messages", locale);I don't know if it helps, but, here's my faces.config: <?xml version='1.0' encoding='UTF-8'?> <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"> <application> <locale-config> <default-locale>pt_BR</default-locale> <supported-locale>pt_BR</supported-locale> <supported-locale>en</supported-locale> <supported-locale>es</supported-locale> </locale-config> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> </faces-config> Thanks in advance!! 
- 
        4. Re: How to load specific resource bundlebabazs Apr 12, 2011 1:53 AM (in response to khosro_question)Does your components.xml file contain the following lines?
 <core:resource-loader>
 <core:bundle-names>
 <value>messages</value>
 </core:bundle-names>
 </core:resource-loader>
- 
        5. Re: How to load specific resource bundlerafaelk May 4, 2011 2:07 PM (in response to khosro_question)Still getting the same error, even with the update in components.xml. Here's my faces config: <?xml version='1.0' encoding='UTF-8'?> <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"> <application> <locale-config> <default-locale>pt_BR</default-locale> <supported-locale>pt_BR</supported-locale> <supported-locale>en</supported-locale> <supported-locale>es</supported-locale> </locale-config> <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> </application> Thanks for the help. 
 
     
    