views:

42

answers:

3

Hello, I am working in internationalization. Can anybody help me how to set up for support different char types?? At least Spanish and German.
I am using Rich faces, this is my configurationfile faces-config.xml

 <application>
        <locale-config>
            <default-locale>en</default-locale>
            <supported-locale>fr</supported-locale>
            <supported-locale>de</supported-locale>
            <supported-locale>es</supported-locale>
        </locale-config>
        <resource-bundle>
            <base-name>messages.Messages</base-name>
            <var>msg</var>
        </resource-bundle>
    </application>

In the pages .xhtml I load the bundle

<f:loadBundle basename="messages.Messages" var="msg1"/>  

and also load the charset:

<meta  charset="utf-8" />

Where must I include needed unicode? Thansk in advance

A: 

What I finally did was changing char by char to uniicode.
But I am sure, it must be another way. I someone knows, please, let me know!
What I use is:

SPANISH
á -> \u00E1
é -> \u00E9
í -> \u00ED
ó -> \u00F3
\u00FA -> \u00FA
ñ -> \u00F1

GERMAN
ü -> \u00FC
ö -> \u00F5
ä -> \u00E4
ß -> \u00DF
mujer esponja
A: 

I use an eclipse plugin for i18n. I just type the text with the normal characters and when you save, the plugin converts them to UTF-8.

pakore
+1  A: 

Java comes bundled with native2ascii tool than you can use to convert from language specific text to latin 1. All you need to do is create a 3 different properties files for French, German and Spanish and then give it to the tool and it will escape the special characters accordingly.

Find more information on the tool here: http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/native2ascii.html

Pangea
Since Java 1.6 there's no need to hassle with native2ascii. Check the "duplicate topic" link in question's comment.
BalusC
thank you very much!
mujer esponja