You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rob Breeds <Ro...@uk.ibm.com> on 2001/11/26 12:00:04 UTC
Dynamic selection of correct language value in pulldown list
Hi
I am creating a pulldown list with a list of languages, English, French,
German... and when form is submitted pass a language code en, fr, de etc.
I think I can work out how to do this with html:options but what I also
need to do is have the display language property pick up the appropriate
language for the user. ie If an English user sees the list they will see
English, French, German. But a French user will see Anglais, Francais,
Allemagne (or whatever the French is!).
In my resource properties file for each language I'd have a key for each
language code, e.g. in Messages_en.properties, lang_fr=French, in
Messages_fr.properties it'd be lang_fr=Francais.
How do I get the message resource value corresponding to the language key
into the pulldown list? Can I do this within the html:select tag or do I
need to prepopulate the form with all the values from the resource bundle
before presenting to the user?
All help appreciated
Thank you
Rob Breeds
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>