Issue Details (XML | Word | Printable)

Key: ROO-346
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Stefan Schmidt
Reporter: Sergi Almar
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Spring Roo

Support for Spanish locale

Created: 06/Nov/09 02:04 AM   Updated: 09/Dec/09 09:54 PM   Resolved: 08/Nov/09 11:09 AM
Component/s: WEB MVC
Affects Version/s: None
Fix Version/s: 1.0.0.RC3

Time Tracking:
Not Specified

File Attachments: 1. File messages_es.properties (3 kB)



 Description  « Hide

Add Spanish translation



Sergi Almar added a comment - 06/Nov/09 02:05 AM

Already done the translation to Spanish


Ben Alex added a comment - 08/Nov/09 11:09 AM

Checked in as SVN revision 398.


Julio Argüello added a comment - 10/Nov/09 12:52 PM

Shouldn't special characters by escaped?

I think files for resource-bundle properties are (per Java standard) required to be encoded in ISO-8859-1. Characters not supported by that encoding can be entered in the file using the unicode-escape sequence (e.g. \u20AC for the euro-sign)


Ben Alex added a comment - 10/Nov/09 01:07 PM

Changing assignee to Stefan so he can see comments/feedback on the localization.


Stefan Schmidt added a comment - 10/Nov/09 04:07 PM

Julio,

You are raising an interesting aspect here. Currently we use ISO-8859-1 for most of our resource bundle files. The resource bundle file will then be copied by Roo from into the user-generated project and it will be parsed using the JDK Properties class so Roo can add some project specific properties to the messages files. This parsing will result in a Ascii escaped unicode file. As an example take a look at messages_sv.properties in Roo RC3 sources:

file --mime roo-rc3/addon-web-mvc-jsp/src/main/resources/org/springframework/roo/addon/mvc/jsp/i18n/messages_sv.properties
roo-rc3/addon-web-mvc-jsp/src/main/resources/org/springframework/roo/addon/mvc/jsp/i18n/messages_sv.properties: text/plain; charset=iso-8859-1

And now in the genereated project:

file --mime src/main/webapp/WEB-INF/i18n/messages_sv.properties
src/main/webapp/WEB-INF/i18n/messages_sv.properties: text/plain; charset=us-ascii

One of the problems we have with ISO-8859-1 is its very limited character support for Western European languages only (English, French, German, etc.). This is where UTF-8 comes in. It supports far more characters (including Japanese, Chinese, etc) and will most likely be the format of choice for us. Obviously we still need to sort out some details there and your feedback would be most welcome.

To make UTF-8 files compliant with the expectations of the JDK we can use tools like native2ascii to produce Ascii escaped unicode files. This however presents a problem in terms of file readability. In eclipse you can use plugins which can take care of converting these special characters so you can work better with your resource bundles.

Cheers,
Stefan