Welcome, Guest
Username: Password: Remember me

TOPIC: How is $language set?

How is $language set? 2 years 2 months ago #74630

  • tacman1123
  • tacman1123's Avatar
  • OFFLINE
  • LimeSurvey Team
  • Posts: 125
  • Karma: 1
I'm trying to track down some language-related bugs, and am wondering how $language is set. If I'm logged in with my base language set to 'English', working on a survey with a base language of 'Vietnamese', and I'm running the statistics report, the select box for choose from a list of answers is generated in statistics.php with the code
//get answers
$query = "SELECT code, answer FROM ".db_table_name("answers")." WHERE qid='$flt[0]' AND language='{$language}' ORDER BY sortorder, answer";

I'm thinking that $language might be set based on cookies, a post or get request, session, something like that, and maybe there's something unexpected in my configuration for prioritizing globals. I have this is a bug report, but maybe it's hard to reproduce with different environments. For example, right now when I import a survey with a base language other than English, but whole UI switches, at least until I move to another section of admin.

Tac
The administrator has disabled public write access.
Moderators: ITEd
Time to create page: 0.134 seconds
Donation Image