Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Login with language selection

 
Daniel Markovic
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I try to get a login screen where the language can be changed. There is no problem to do that after I have logged in. But how can I change it immediately after I switched the language? (For example the Horde Email Platform has this possibility. But unfortunately it is written in PHP. Here is an example.)

I tried it already with a valueChangeListener. But how can I update the page itself? Is this possible in JSF?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18012
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally when a person first enters a website, I display a welcome page for the language that that user's browser is set to prefer. Most likely, if I wanted to support the user's being able to select a language for a specific app, I'd place a drop-list menu of languages on the welcome page. Selecting the language would either re-request the welcome or login page for that language, or use client-side Javascript to update the currently displayed page with the selected language.

If the welcome page is a login page and you're using container-based authentication, it might require a little more creativeness, but same general idea.

Also, it's a good idea to keep a cookie so that the user doesn't have to select every time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic