Skip to main content

add XML support for java.util.ResourceBundle

2 replies [Last post]
wangzaixiang
Offline
Joined: 2004-11-24
Points: 0

Currently, ResourceBundle support only properties based loading, since properties is ISO8859-1 based, it is not suitable for other language. although native2ascii tool can help us to solve the problem, i think the best way for it is to support loading XML resource.

Now, for example, ResourceBundle.getBundle("foo.Demo") should first load foo/Demo_xx_yy.xml then foo/Demo_xx_yy.properties.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mokutsu
Offline
Joined: 2005-12-06
Points: 0

Mustang has some enhancements to ResourceBundle so that you can define resources in other formats, like XML. Please check out http://java.sun.com/developer/JDCTechTips/2005/tt1018.html#2 .

erickson
Offline
Joined: 2004-07-07
Points: 0

Having to create a class if you want to localize anything besides Strings is a pain.

ResourceBundle should attempt to load a serialized ResourceBundle using Beans.instantiate