On 12/12/09 4:11 PM, Jeppe Nejsum Madsen wrote:
> Indrajit Raychaudhuri<indraj...@gmail.com>  writes:
>
>> On 11/12/09 5:28 PM, Jeppe Nejsum Madsen wrote:
>>> Jean-Adrien<jean.vauc...@gmail.com>   writes:
>>>
>>>
>>> [...]
>>>
>>> I have the same issues with the localized properties....
>>>
>>>> = Conclusion =
>>>>
>>>> The problem here comes from my initial configuration. But in my sense
>>>> it is not a good idea to store i18n data in another format than UTF-8.
>>>
>>> Agreed
>>
>> However, for minimum grief I always use unicode escaping (using \u) in
>> locale properties.
>
> But it is not really an option (I think) to edit files like
> this. Sure, for one off changes it's possible, but for an entire
> application that needs to be translated into several locales I don't
> think this is feasible.

Agreed on the inconvenience factor. But not relying on the actual 
encoding of the file and using \uxxxx is what worked most reliably for 
me (fully localized web applications supporting 10+ languages).

FWIW, PropertyResourceBundle uses properties.load(InputStream) which 
assumes ISO-8859-1 (Latin1) encoded stream. In Java 6, however, you have 
properties.load(Reader) which does not have this limitation.

>
>>
>> The output of "native2ascii src/main/resources/translate_fr.properties"
>> should interest you :)
>
> I know about this tool, but this means an extra step in the build
> process and  it's not really supported by IDE's. All in all making the
> turnaround time longer...

Some build plugin exists:

Ant: http://ant.apache.org/manual/OptionalTasks/native2ascii.html

Maven MOJO: http://mojo.codehaus.org/native2ascii-maven-plugin/ (as Tim 
already mentioned)

Maven (via antrun): 
http://docs.codehaus.org/display/MAVENUSER/Maven+and+native2ascii

IntelliJ IDEA has first class support for this. Not sure about other IDE 
support but looks like quite a few exist for Eclipse as well. (I haven't 
used Eclipse or Netbeans for quite sometime now.)

>
>> You don't have to use the xml format really. Just escape the characters
>> with unicode encoding (\u) and you should be covered.
>
> See above :-)
>
>
> /Jeppe
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "Lift" group.
> To post to this group, send email to lift...@googlegroups.com.
> To unsubscribe from this group, send email to 
> liftweb+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/liftweb?hl=en.
>
>

--

You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.


Reply via email to