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

  • Home
  • SEARCH
  • 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 7192003
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:50:54+00:00 2026-05-28T19:50:54+00:00

In my application(GWT(EXT_GWT) + Spring) I need to set user(after login) his native language,

  • 0

In my application(GWT(EXT_GWT) + Spring) I need to set user(after login) his native language, without get params. For example: user filling his login&pass at login form and then redirecting at ready-to-work form (this form must be with native user language. Locale I get from db). My language files written at .properties files and enumerated in module.gwt.xml config.

So question is – how I can set language? Maybe with session or post params? But I don’t understand how GWT before loading page choose needed locale. Some methods to set locale at gwt before page loaded?

Thanks!

  • 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-05-28T19:50:54+00:00Added an answer on May 28, 2026 at 7:50 pm

    Using the built-in internationalization and using it as intended, you can’t do this without reloading the page. The built-in i18n relies on only loading the compiled permutation that corresponds to the selected locale. This means you can’t just add a meta tag, you can’t just flip a setting, and you won’t be able to read from the built in LocalInfo class.

    Two options, as I see it. First, make the reload less expensive, so you can use the i18n stuff GWT comes with. To do this, break out the rest of the app from the login, either by making a new app, or by using split points, so as little code as possible is loaded. Compiles files should be caches, so it shouldn’t affect the download time, just the time it takes to start the app.

    Second option, following your constraint of not reloading: Don’t use the built in I18n, but find another way to pull in strings based on runtime data (as opposed to the usual compile-time approach).

    • GWT documents one such way of doing this with the Dictionary class, allowing you to read from strings loaded by javascript (see http://code.google.com/webtoolkit/doc/latest/DevGuideI18n.html#DevGuideDynamicStringInternationalization). This could be done by loading a JS file with these strings after login (consider ScriptInjector for this so you know when it is ready). This has the additional advantage that you don’t need to recompile to change strings, if you consider that an advantage, and the disadvantage that you need to have the strings in JS, not java and properties files (though some careful server work could allow you to generate that js from java/properties).
    • Make several I18n interfaces instead of just one. They should probably all implement a common interface so you can pass along the instances to anything that needs them, widgets, etc. The problem with this approach is that while you are using the built-in I18n, you are compiling in all of the strings, whether they are used or not. To ameliorate this, consider a split point for each locale required, and make sure you only load one of them.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my GWT application, I want to ask a user confirmation when he navigates
I'm writing GWT application where I need to upload video file and encode that
I have a GWT application which is secured by Spring Security. I have a
I have a gwt application which I need to apply custom themes for specific
I need to build a GWT application that will be called by an external
I am writing an application in GWT and I need to detect when a
I have implemented a simple GWT application featuring a login service (LoginService) and a
As part of porting a legacy application to GWT, we need to embed our
I have a clean GWT application which I want to secure with Spring Security.
I am developing a web application using gwt and gwtp. I can get a

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.