wood burning stoves 2.0*
The moose likes Java in General and the fly likes Help with I18N Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help with I18N" Watch "Help with I18N" New topic
Author

Help with I18N

Arthur Buliva
Ranch Hand

Joined: Mar 08, 2006
Posts: 101
Hi Friends,

I have a problem when I try accessing a locale file from an absolute path.

I have this code:

It works well because I have the locale file as part of the packages of the application.

However,

brings out this problem:

Any help please?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

ResourceBundle.getBundle is using a resource name; it isn't called ResourceBundle for nothing. I believe that you can create a custom ClassLoader and use that to load the data:
Note: not tested.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Arthur Buliva
Ranch Hand

Joined: Mar 08, 2006
Posts: 101
Thanks Rob. A little modification and all is OK

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help with I18N
 
Similar Threads
Internationalization
ResourceBundle file name problem
ResourceBundle.getBundle
Exception in locale
internationalization help!