File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes How to use spring:message tag to display message in Persian language ? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "How to use spring:message tag to display message in Persian language ?" Watch "How to use spring:message tag to display message in Persian language ?" New topic
Author

How to use spring:message tag to display message in Persian language ?

somayeh khodadad
Greenhorn

Joined: Oct 31, 2010
Posts: 12
hi everybody,
i know how to use spring:message tag in my project. but up to now i have used it just for latin characters. Now i want to use it for another language like persian and i don't know what should i do.

i'll be grateful if you help me.
Thanks.

Shashank Ag
Ranch Hand

Joined: Dec 22, 2009
Posts: 88

Since, you are asking this I hope you are using spring MVC only.
Well I am not writing a full tutorial here, but few simple steps.
Just google along this and it'll get done.

1. In dispatcher servlet xml you need to specify locale resolver. It can be either session base locale resolver or cookie based locale resolver (it is spring api bean). Give base path as message.
2. Make message.properties file say for persian message_pe.properties
3. In jsps import taglib and use <spring:message tags
4. At the point where so may need to switch locale (say hit of button), get the locale resolver bean and set locale as "pe" or "en" etc.


SCJP 91%, SCWCD 97%
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to use spring:message tag to display message in Persian language ?
 
Similar Threads
supporting right to left align,viceversa left to right align in 1 jsp in struts internationalization
how to change textbox language?
Passing the JSTL variable (with special characters) to JavaScript function?
Misha...
Implementing resource bundle in javascript