Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Languague detection

  • arunicbe
  • arunicbe's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 3 weeks ago #117975 by arunicbe
Languague detection was created by arunicbe
I have a survey with three languages. Is possible to detect the browser's language and take the user to relevant language site?
The topic has been locked.
  • tpartner
  • tpartner's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 weeks ago - 9 years 3 weeks ago #117983 by tpartner
Replied by tpartner on topic Languague detection
You could first send respondents to a remote PHP script that uses HTTP_ACCEPT_LANGUAGE to detect the browser language and the redirects to the appropriate survey.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Last edit: 9 years 3 weeks ago by tpartner.
The following user(s) said Thank You: arunicbe
The topic has been locked.
  • arunicbe
  • arunicbe's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 3 weeks ago #117987 by arunicbe
Replied by arunicbe on topic Languague detection
Is it possible to do without redirection?
The topic has been locked.
More
9 years 3 weeks ago #117990 by jelo
Replied by jelo on topic Languague detection
I wouldn't do to much detection. E.g. I have a few languages in my browser marked to accept. Sometimes a website is doing all the detection and won't allow me to change to a different language.
Sometimes the currency to pay is already limited because the programmer wanted to be very clever.

You can use the Language Switch to allow probands to change the language
manual.limesurvey.org/Question_type_-_Language_switch

You can use Javascript/Jquery to detect browserlanguage and do a redirection with a link to your survey with a language code added to the URL, but I don't think it's worth the work. Browser language NOT always identical to language preference of the user which is using the browser.

For Javascript detection:
jsfiddle.net/xareyo/V7yDy/

Did you already tried, if Limesurvey is displaying the default language even if a different browser language is defined as default in the browser options?

Limesurvey isn't offering a browser detection out of the box. But DenisChenu is the man. He has told me that we don't need to do a feature request (had one a few years ago, but it was deleted with the old feature request website), since he already has a browser detection routine working. www.limesurvey.org/en/profile/userprofile/DenisChenu

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: holch, Ben_V
The topic has been locked.
  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
9 years 3 weeks ago #118006 by holch
Replied by holch on topic Languague detection
I totally agree with Jelo!

Language detection seems often like a good idea, but mostly it is not. My browser for example is in Portuguese, my Windows as well. But I would rather choose English or German for my survey. Sometimes people use the computer of others, in a different country, etc.

To be honest, I don't think that language detection is worth the hassle. I know very few people that would actually have a problem with choosing their language from a menu.

Even worse are those that detect the device and want to force me to the mobile versions of websites on a 10" tablet. That doesn't make any sense, the mobile version usually works a lot worse on such a display than the normal website version. Some at least give you the chance to go back to the normal desktop version. Most mobile sites are really bad when used on a bigger screen than a mobile phone. I bet that on those new devices with 5" or more the normal websites also work better than the mobile versions. RANT OVER. :-)

I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.

The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose