• Welcome to KonaKart Community Forum. Please login or sign up.
 

Translation Problem.

Started by giannisapi, October 30, 2009, 11:45:21 am

Previous topic - Next topic

giannisapi

Hi all,

I am trying to use a messages.properties file with greek characters.
I am sure that the application picks up the right properties file which is Messages_gr.properties when i click the greek flag. This means that the action is fired correct and that the correct locale is used(id i am right).

The problem is that the web pages displays random characters, thus, not the right messages.
In order to avoid this I saved my properties files in utf8 then used the java nativetoascii to generate a new properties file and use this in my application. The result is something like :
write.review.body.good=\u039e\ufffd\u039e\u00b1\u039e\u00bb\u039f\ufffd

But when i rebuild and run the application with this updated properties file i again get random characters.
After that I put some greek text hard coded in a jsp page. After I rebuild and run the application the hard coded greek characters in the jsp page are displayed fine.

Does this mean that there is something wrong with my properties file?

Any help would be appreciated.


Kind Regards,
Giannis

trevor

Running nativetoascii is the correct approach. If that made no difference at all, I'd say that it isn't reading the file you think its reading.

giannisapi

Hi and thanks for your reply.

I am sure that it reads the file because when I put a text for title "Future Store" only in this file, it appears when i change the language. The only problem is with the greek characters.

I used notepad++ to create the file.

Should i use something else to write the file?

Would you have any other suggestions regarding this, as i am sure that the file is being read.


Regards,
giannis

greg

It's been a while since I did this but I think I used plain old Notepad and saved the file in the format I needed which did the trick.


giannisapi

Hi again,

I actually have found the sollution to the problem. When using the nativetoascii program, someone has to use the -encoding option in order to use the right encoding option.

Thanks for your time.

regards,
giannis