get User language and locale.

asked 2013-07-01 09:06:54 +0800

icju gravatar image icju

Hi, there! I need to retrieve user language and his locale, does someone knows how I can do it?

p.s. now I can retrieve only Server's language and locale. and it seems that Executions.getCurrent().getSession().getAttrubutes not works(

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-07-02 13:38:05 +0800

dis gravatar image dis flag of Switzerland
140 4


use Executions.getCurrent().getHeader("accept-language") to get the language which is defined in the users browser.


link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2013-07-01 09:06:54 +0800

Seen: 33 times

Last updated: Jul 02 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More