Here is a description of how Locale info works in GateIn-3.1.0.GA: http://community.jboss.org/message/546727#546727
This has later been refactored - see https://issues.jboss.org/browse/GTNPORTAL-1306.
You can find docs for current localization in svn repository: http://anonsvn.jboss.org/repos/gatein/portal/trunk/docs/reference-guide/en/modules/PortalDevelopment/LocalizationConfiguration.xml
Checkout and build GateIn portal docs to be able to read that.
- You get portal Locale via: UIPortalApplication.getLocale()
- You get user local via PortletRequest.getLocale()
When logged-in user changes the language, the new language is saved in user's profile.