• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

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

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
Ranch Hand
Posts: 88
Spring Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic