ResourceBundle location .properties files in different directories.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Stephen_Smith
Posted On:   Saturday, May 31, 2003 08:20 AM

Hi,

I've got a class that uses a ResourceBundle (named IntlUtils) to find .properties files (named intl.properties, intl_es.properties etc.), in order to provide internationlised values.

However, the .properties files are located in a different directory to IntlUtils and I'm not sure how to address the property files.

I've tried ResourceBundle.getBundle("..\intl\intl") and using a PropertyResourceBundle, but neither has seemed to work.

Can anyone help me out?

Thanks,

Steve.

Re: ResourceBundle location .properties files in different directories.

Posted By:   AlessandroA_Garbagnati  
Posted On:   Saturday, May 31, 2003 09:56 AM

Hi,

I don't know how the IntlUtils class has been developed, but knowing the I18N basics, I would think that the properties file would be passed the same way it is passed to the ResourceBundle.getBundle() method, that is using the structure of the package.

So, if your properties file is located in the mypackage/subpackage directory under the classpath, and it is named intl.properties (or intl_it.properties, etc), you should be able to access it through ResourceBundle.getBundle("mypackage.subpackage.intl")
About | Sitemap | Contact