0

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

Blanca Hdez
  • 3,513
  • 19
  • 71
  • 93
  • duplicate of [i18n with UTF-8 encoded properties files in JSF 2.0 appliaction](http://stackoverflow.com/questions/3645491/i18n-with-utf-8-encoded-properties-files-in-jsf-2-0-appliaction) – BalusC Oct 25 '10 at 12:46

3 Answers3

1

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

Aravind Yarram
  • 78,777
  • 46
  • 231
  • 327
  • Since Java 1.6 there's no need to hassle with native2ascii. Check the "duplicate topic" link in question's comment. – BalusC Oct 25 '10 at 19:03
0

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
Blanca Hdez
  • 3,513
  • 19
  • 71
  • 93
0

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
  • 11,395
  • 12
  • 43
  • 62