• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Localize select box

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I want a select box to display localized values (the values are: once, daily, weekly). I want these values to be displayed in different languages for different users. I'm already using the fmt tag to display localized messages on the site.

In the resouce file containing the translations I have this (I do of cource have the corresponding files for the other languages):
Global.Frequency.Once=Once
Global.Frequency.Daily=Daily
Global.Frequency.Weekly=Weekly

I've tried something like this (frequencies contains the values: Once, Daily, Weekly). But it failes because the fmt tag doesn't seem to accept expressions in the key. What I'm trying to do is to make the key for the fmt tag "Global.Frequency.Once", "Global.Frequency.Daily", "Global.Frequency.Weekly".



Any suggestions on how to solve something like this would be greatly apprechiated?

Best regards,
Mattias
[ August 26, 2007: Message edited by: Mattias Ahlin ]
 
Mattias Ahlin
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Problem solved

I used:
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt" %>

instead of:
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

which is a older version where expressions weren't allowed.
 
Ranch Hand
Posts: 510
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mattias, I like your idea. Would you please tell me where you placed the resource file (properties file?) in your web app structure?

Thanks
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic