wood burning stoves 2.0*
The moose likes Spring and the fly likes Internationalization with dropdown Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Internationalization with dropdown" Watch "Internationalization with dropdown" New topic

Internationalization with dropdown

Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130

Internationalization is implemented by the following principle:

Files containing messages:
Bundle_en_US, Bundle_es_MX

Each .jsp includes:

Each message:

When i switch the locale language on browser level it does work indeed;
But does NOT work, when i want to change the language from code:

How to implement change of the language from code for above approach?
Precisely, i want to have a combo box on the header of the page and to be able to switch language -is their maybe a simpler approach than calling a Controller (servlet)

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60765

Please read HtmlHasNoComboBox

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130
Thank you for guiding this thread to right track, Bear!

Will replace drop-down (combo) with links (EN, ES);

BUT, still haven't found for issue how to change the language content via code? That command should affect the Browser settings, i think?
How to change language from code in servlet?

Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130
Still no progress -let me know if you have any idea, please
Question also posted on:

Imre Tokai
Ranch Hand

Joined: Jun 04, 2008
Posts: 130
Initial issue has been solved on other forum.

New question:
Is there a way to select language from drop-down instead of links?

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: Internationalization with dropdown
Similar Threads
Struts: The Complete Reference - Internationalizaion ???
Bilingual JSP application
Internationalization: variable language and validation
Problem changing languages struts 1.2.9
Doubts regarding <locale-config> tag in JSF.