How to realize czech texts with ResourceBundles
Hi!
I have got a big problem trying to make one of our german applications available in czech.
We are using ResourceBundles with .properties files for our texts and have now translated them into czech. When loading the bundle by calling:
ResourceBundle rb = ResourceBundle.getBundle("x.x.x.BundleName", locale);
all seems to work and there is no exception thrown.
But when i try to get any text out of it i.e. by calling:
rb.getString("name");
i get an exception:
java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key name
I tryied to use native2ascii with several encodings (Cp1252, ISO-8859-1, ISO-8859-2, UTF-8, UTF-16, ...) but i never got one that realy works the way i want. Most of the encodings i tryied changes some of the special characters in the file but also left some of them so that i can get some translated texts but most of them with boxes or question symbols within. native2ascii with UTF-8 encoding only answers with a sun.io.MalformedInputException in the comand line. UTF-16 initially looked fine cause nearly all special characters was translated into \uXXXX escape sequences but also there i got a problem with one special character: ?(hope it will be displayed correctly here). This character seems to annoy the native2ascii tool cause the following characters would also be translated into escape sequences even if this is not necessary. Also i got some question symbols in the GUI again (having the charset in the HTML/JSP file set to UTF-16).
I don't know why the original translated property file could not be read in getting an exception only when trying to get a text not when loading the file. Another thing confusing me is that all encodings (except UTF-16) that i tryied for the translated file corrupted the file by seperating each character with a blank one (so i.e.name = jm閚o appered asn a m e = j m \u00e9 n o).
Some of the special characters in the translation are: ?(and also some other characters with those symbols).
Please can anyone help me or does anyone has experiences with translating a (web) project to czech or any similar/related language.
Thanks a lot
Juergen

