This method stores a personal setting on the HTTP Session, but not in the DB. It also handles setting the runtime settings in the server for language and locale if you try to set the locale. You should always set the Locale, which will automatically set the language, rather than just setting the language, which will allow the language and locale to get out of sync.
PTPersonalSettingsHelper Class | com.plumtree.portaluiinfrastructure.login Namespace