Added new method for detecting locale from session variable.