Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8629097
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:43:00+00:00 2026-06-12T08:43:00+00:00

My current project allows the user to change the language all pages are displayed

  • 0

My current project allows the user to change the language all pages are displayed in on each page (by clicking on one of a row of flag icons). Here is the implementation of the link:

Link<Locale> changeLocaleLink = new Link<Locale>("link", locale) {
    @Override
    public void onClick() {
        Locale newLocale = getModelObject();
        // nothing esoteric done with setLocale(...) in MySession
        MySession session = MySession.get();

        session.setLocale(newLocale);
        if (session.isSignedIn()) {
            // set the new locale in the user's preferences
        }
        setResponsePage(getPage());
    }
};

With Wicket 1.5, this worked without problems. The page reloaded and all labels were changed accordingly. However, since I’ve migrated my code to Wicket 6.0, only some (seemingly random) labels are changing upon changing the locale, so I’ve no idea what causes the issue.

I’m using (Wicket-)standard ResourceModels and resource files for all of my labels.

Please note that using:

setResponsePage(getPage().getClass());

and

setResponsePage(getPage().getClass(), getPage().getPageParameters());

doesn’t work for me, since the code should work for all pages and I have quite a few stateful, non-bookmarkable pages whose constructors don’t follow the above patterns.

Has anybody experienced the same with Wicket 6.0?

EDIT: It seems that most, but not all labels of Links are affected! Also, I don’t see any exceptions thrown when this happens.

EDIT2: Due to svenmeier’s request, I’ve done more research. All links which aren’t updated accordingly are constructed as follows:

BookmarkablePageLink<MyPage> link 
    = new BookmarkablePageLink<MyPage>(ID, MyPage.class, params);
link.setBody(new ResourceModel("My.Internationalized.Text"));

So it seems that the model which is set as body model isn’t updated by the link component. Which leaves the question why that did work with Wicket 1.5.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T08:43:01+00:00Added an answer on June 12, 2026 at 8:43 am

    The issue has been fixed in Wicket 6.1.0! Unfortunately I can’t say which fix did the job, though WICKET-4738 sounds a lot like my issue.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

One of my requirements for my current project is to allow a user to
I'm using the jKey jQuery plugin on a current project. It just allows you
I'm trying to develop a small Stripes project that allows the user to uoload
For a current project we need to allow a user only to press a
My current project is broken down into 3 parts: Website, Desktop Client, and a
Our current project has ran into a circular dependency issue. Our business logic assembly
My current project involves using LDAP (Active Directory) and I'm using issue tracking for
On my current project, which is a delivery system, I have a list of
for my current project i need to consume messages from many destinations (from hundreds
In my current project, I want to convert List<String> to RegionLabel Object. For instance,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.