Lets make IT better by sharing the solutions

Friday, July 18, 2008

Multilanguage Support to Struts

As we have heard so many time that sturs i a frame work which provide multilingual support very easly.Its true for those languages which supports ascii characters.For Arabic like languages its not that easy. There is one standard characterset format that is UTF-8,which supports many languages including Arabics also. So while developing multilanguage application one has to concentrate on characterset which s UTF-8.Talking About java which is UTF-16 by default so we will not get the proper result simply. Following are the steps involved in making it UTF-8 centric.
The .properties file for that language should be converted into UTF-8 format using
native2ascii utility of jdk.
the spl character written on the page will display like \uXXX\uYYY.
Now make your jsp page able to present in UTF-8 format by setting charset as UTF-8.
Now set the request encoding to UTF-8.
If you are using database make sure charecterset variable of you db is set to UTF-8.
Also the database shold be created after setting characterset.
Its done now.
For detail code contact me on mail....mailid:mydesires100@gmail.com

No comments: