JDK-4782235 : Support XML based properties in ResourceBundle
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util:i18n
  • Affected Version: 5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_nt
  • CPU: x86
  • Submitted: 2002-11-21
  • Updated: 2004-09-15
  • Resolved: 2004-09-15
Related Reports
Duplicate :  
Description
There are some limitations with current properties file.

1. Only ascii encoding is allowed.
It forced the user to deal with /uxxxx for non-ascii chars in a properties file. native2ascii tool was also exposed to the user to convert their native strings to /uxxxx stings.

2. A properties file per locale.
A properties file has only one locale. Maintaining multiple localized properties(xxx_ko.properties, xxx_ja.properties, etc) is costly.

Probably XML based properties(say .xmlproperties) can get over the limitation of .properties resource bundle. For example, the following form is smiliar with JAWS jnlp file format which allows multiple locale sections in one xml file.

<?xml version="1.0" encoding="UTF-8"?>
<xmlresource xmlns=xxx>
		
	<records locale="en">
		<record key="test key">
			<string value="test value 1"/>
			<string value="test value 2"/>
		</record>
	</records>

	<records locale="ko">
		<record key="test key">
			<string value="localized test value 1"/>
			<string value="localized test value 2"/>
		</record>
	</records>
</xmlresource> 

###@###.### 2002-11-20

Comments
EVALUATION Support for XML based resource bundles is being considered for the next API release. ###@###.### 2003-01-22 Closing this RFE as a duplicate of 4403721. ###@###.### 2004-09-15
22-01-2003