• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL: Changing the case with i18n tags

 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am using JSTL in JSPs for internationalizing my application. In it there are several occurrences where a text string is used in multiple places with just the difference in case. To cater this I have to create 2 entries for such strings in my properties file, one for lower case and the other for upper case. Is there anyway that I can capitalize the text JSP by using the lower case entry in my properties file? In this way I can reduce the entries in my properties files.

I am using the JSTL distributable provided in Weblogic 9.2 (which are <fmt:message key=""/>, <fmt:setBundle app=""/> etc.) I have tried mixing it with the 'functions' tags/actions (the fn:toUpperCase method) but to no avail. Any idea or suggestion will be helpful.

Thanks.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, as I didn't know about this and will take care in the future. Thanks for letting me know.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it not be easier to have the mixed case version in the properties file and simply lowercase the entry when necessary?
 
Haq Yunus
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear, I'm a bit confused here: how will I lower case it in the JSP? By fn:toLowerCase method (if not toUpperCase which I was trying to use before)? But as I told you it is not working.
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!