see http://wicketstuff.org/wicket13/pub/
and http://wicketstuff.org/wicket13/pub2 source is available in wicket-examples project -igor On Feb 12, 2008 8:01 AM, Korsten, Peter, VF-MT <[EMAIL PROTECTED]> wrote: > Hi, > > I've just started with Wicket, and I'm struggling a bit with the > documentation. Google hasn't helped either to provide an answer. > > What I'm after is to have a 'switch locale' link in a different > language. Suppose you have an English (default) and a Dutch version, you > would have 'Nederlandse versie' on the English page, and 'English > version' on the Dutch page. > > The page is a single HTML page, with the different text labels in > properties files. The locale code that you'd want to switch to ('en' for > English, 'nl' for Dutch) is stored in the properties files as well. > > Now, I don't want to make two HTML pages, because this one is going to > be used for the navigation structure, and having two pages is > undesirable because of the maintenance aspect. > > I did manage to switch languages, but only by hard-coding the locales in > the Java file, checking what the current locale is, and switching to the > other one. Whilst it works, it's a clumsy solution. I've considered > panels and separate HTML files for the link, but that too looks > needlessly complex. > > So, is it possible to make a link that takes the language code from the > properties file as a parameter, and does something along the lines of > getSession().setLocale(new Locale(lc)), where lc is the language code > from the link? > > Thanks, > > - Peter > > > There is only one of you for all time. Fearlessly be yourself. > Life is Now! > ------------------------------------------------------------------- > > This email is intended only for the use of individuals to whom it is > addressed, as it may contain confidential or privileged information. If you > are not a named addressee, intended recipient, or the person responsible for > delivering the message to the named addressee, be advised that you have > received this email in error and that you should not disseminate, distribute, > print, copy this mail or otherwise divulge its contents. In such instances, > please notify Vodafone Malta Limited on telephone number +356 99999247 and > delete this email from your system. Since this transmission was affected via > email, Vodafone Malta Limited cannot guarantee that it is secure or > error-free as information could be intercepted, corrupted, lost, destroyed, > arrive late or incomplete, or contain viruses. Vodafone Malta Limited does > not accept liability for any errors or omissions in the contents of this > message which arise as a result of email transmission. > > Save the environment for our children - Print e-mail only when necessary. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]