There is a locale pub example in wicket-examples that shows how to do it.

-igor
On Apr 1, 2011 3:21 PM, "hrbaer" <[email protected]> wrote:
> Hi all,
>
> is there any chance to change an image once the user choose another
> language?
> With a text it's very easy because the only thing you have to provide are
> the different language property files.
>
> Let's assume there is a dropdown with different languages. I've added
> DropDownChoices and implemented the onSelectionChanged method. If the user
> choose another option the only thing I have to do is to set the Locale to
> the choosen language.
>
> Is there a similar functionality for images?
>
> At the moment I've tried a little bit with this:
> ------------------
> Image imageGerman = new Image( "someImage", new ResourceReference(
> Home.class, "images/logo.png" ) );
> Image imageUK = new Image( "someImage", new ResourceReference( Home.class,
> "images/logo2.png" ) );
> add( isLocaleGerman() ? imageGerman : imageUK );
> ------------------
> But this is only working if the page constructor is called.
>
> Any ideas?
> Thanks in advance.
>
> --
> View this message in context:
http://apache-wicket.1842946.n4.nabble.com/changing-image-on-locale-change-tp3421291p3421291.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

Reply via email to