| 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%
|
 |
 |
|
|
subject: How to use spring:message tag to display message in Persian language ?
|
|
|