| Apache Wicket > Framework Documentation > Reference library > How to do things in Wicket > i18n > Manually switching locale |
To manually switch the locale:
public final class MyPage extends WebPage { ... add(new Link("languageSwitch") { @Override public final void onClick() { Locale locale = new Locale(MyPage.this.getString("header.versionLanguage")); this.getSession().setLocale(locale); } }); ... }