aspose file tools*
The moose likes JSF and the fly likes Login with language selection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Login with language selection" Watch "Login with language selection" New topic
Author

Login with language selection

Daniel Markovic
Greenhorn

Joined: Apr 24, 2008
Posts: 1
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

Joined: Jun 25, 2001
Posts: 15657
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Login with language selection
 
Similar Threads
submit information to web page
How to implement login mechanism like JavaRanch has
Change language of application
going to earlier page after relogin
Browser not displaying the selected locale's string