Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
html
html
  <wicket:message key="page.label">Default label</wicket:message>

If you want to use Wicket's i18n in other HTML elements, for example:

Code Block
html
html

<input type="submit" value="Search"/>

You can't use the <wicket:message/> component, you should use the following:

Code Block
html
html

<input type="submit" wicket:message="value:page.search"/>

i18n of Entire Pages

To i18nise an entire page, it's the same simple approach as for a label. We simply write entire pages with the locale name appended to the page name:

...

Panel

<a wicket:id="links.acme">Ã?£?ââ?¬Å"Ã?£?Ã?¡Ã?£ââ?¬Å¡Ã¢â?¬Â°</a>Ã?£?Ã?«Ã?£?ââ?¬?Ã?¨Ã?¦Ã?§Ã?£??Ã?£?Ã? Ã?£?ââ?¬Â¢Ã?£?ââ?¬Å¾acme">ã?â€Å"ã?¡ã‚‰</a>ã?«ã?â€?覧ã??ã? ã?•ã?„.

and in our Page.java:

Code Block
  add( new i18nLink( "links.acme" );

...