This content has been marked as final.
Show 4 replies
-
1. Re: how to do newlines in messages.properties?
benmoore Sep 10, 2008 6:32 PM (in response to benmoore)p.s. i don't want newline in the property value. i just want newline in the properties file for readability.
-
2. Re: how to do newlines in messages.properties?
luxspes Sep 10, 2008 7:04 PM (in response to benmoore)AFAIK you can not do it, you could if you used XML for messages.properties unfortunately, there is no built-in option available to treat a ResourceBundle as an XML file. The sad part is a PropertyResourceBundle does use a Properties object to load the bundle; however, the use of the load method is hard-coded into the class, and the newer loadFromXML() method is not used.
-
3. Re: how to do newlines in messages.properties?
luxspes Sep 10, 2008 7:08 PM (in response to benmoore)Mmmm, maybe seam implements this... in that case, XML based resources bundles should work... and if it doesn't support them it still might be a good idea to request the feature in JIRA...
-
4. Re: how to do newlines in messages.properties?
vladimir.kovalyuk Sep 11, 2008 6:50 AM (in response to benmoore)It would be great!
Use of native2ansi should stay in the past.
In relationg to Xml property file I see one big shortcoming - it is plain without hierarchy. I would like to write something like this:
<entry key="org.company.project">
<entry key="entity">
<entry key="Product">product</entry>
<entry key="Contract">contract</entry>
</entry>
<entry key="message">
...
</entry>
</entry>
(Forum does not allow me to reset the option "Let me type some plain text, not markup" so excuse me for unformatted text)