wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calle sollander <callesollan...@msn.com>
Subject Change text on wizard buttons.
Date Wed, 17 Feb 2016 08:06:52 GMT
Hello!

I'm trying to get the buttons in the Wizard component to be in Swedish but I can't get it
working.
I have added this to my properties file:

datatable.no-records-found=Din sökning gav ingen träff
org.apache.wicket.extensions.wizard.next=Nästa >
org.apache.wicket.extensions.wizard.previous=< Föregående
org.apache.wicket.extensions.wizard.last=Sista
org.apache.wicket.extensions.wizard.finish=Spara
org.apache.wicket.extensions.wizard.cancel=Avbryt

I use a Wizard with two simple WizardSteps like this:

System.out.println("previous: " +Application.get().getResourceSettings().getLocalizer().getString("org.apache.wicket.extensions.wizard.previous",
null, null, null, null, "DEFAULT"));
WizardModel m = new WizardModel();
m.add(new DummyStep());
m.add(new DummyStep2());
Wizard w = new Wizard("wizard", m);
add(w);

The sys.out above prints the Swedish word for previous but the button in the wizard is in
English.
If I change the Locale to e.g. French the buttons show French texts, it seems like the wizard
is always using the Wizard.properties file and since there
is no Swedish version it defaults to the English one.
The "datatable.no-records-found" property works like it is supposed to in a Datatable on the
same page.

Is it not possible to override the button texts in a Wizard?
Should I use some other component for my Wizard?

Regards, Calle


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message