- Posts: 18
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Languages only accessable for few questions
- DPoth
- Topic Author
- Offline
- New Member
Less
More
7 years 4 months ago #144181
by DPoth
Languages only accessable for few questions was created by DPoth
Hello,
I have a survey that is in multiple languages, that are sometimes written from right to left.
Since I can't read those languages and assume that most people are able to understand some englisch, I would like to limit the language choice on a few questions.
So that, eventhough there are multiple possible languages, they can't choose at the beginning. But only for the questions that I propose in different languages.
Has someone some experience on that matter?
Thanks
D
I have a survey that is in multiple languages, that are sometimes written from right to left.
Since I can't read those languages and assume that most people are able to understand some englisch, I would like to limit the language choice on a few questions.
So that, eventhough there are multiple possible languages, they can't choose at the beginning. But only for the questions that I propose in different languages.
Has someone some experience on that matter?
Thanks
D
The topic has been locked.
- urbana
- Offline
- Premium Member
Less
More
- Posts: 90
- Thank you received: 17
7 years 4 months ago #144188
by urbana
Replied by urbana on topic Languages only accessable for few questions
Two possible workarounds:
1. You create all languages you need but you use always English except for the question you want to provide in other languages then english.
And you explain why you haven't translated every question.
2. You work with Javascript
you would define an object like that:
var translation_LANGUAGE = {variable1:"translation",variable2:"translation"...}
You create such an object vor every language and then comes the tricky part. Since it depends on the question type how it easy embedded in the DOM you would have to query the whole DOM for the variables and replace them.
Possible tough but you would have to play around a little.
To evoke the translation you would provide a dropdown on every question you want to translate.
So als long you don't have a sound knowledge of JS you should use workaround 1
1. You create all languages you need but you use always English except for the question you want to provide in other languages then english.
And you explain why you haven't translated every question.
2. You work with Javascript
you would define an object like that:
var translation_LANGUAGE = {variable1:"translation",variable2:"translation"...}
You create such an object vor every language and then comes the tricky part. Since it depends on the question type how it easy embedded in the DOM you would have to query the whole DOM for the variables and replace them.
Possible tough but you would have to play around a little.
To evoke the translation you would provide a dropdown on every question you want to translate.
So als long you don't have a sound knowledge of JS you should use workaround 1
The following user(s) said Thank You: DPoth
The topic has been locked.
- DPoth
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
7 years 2 months ago #146194
by DPoth
Replied by DPoth on topic Languages only accessable for few questions
And is there no way to include a language switch (that I would hide) and set it on English on default?
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
7 years 2 months ago #146233
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Languages only accessable for few questions
Hi,
Remove {LANGUAGECHANGER} from your template, addit in your question (or create a language change question at start)
Remove {LANGUAGECHANGER} from your template, addit in your question (or create a language change question at start)
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
- holch
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 11746
- Thank you received: 2750
7 years 2 months ago #146247
by holch
I answer at the LimeSurvey forum in my spare time, I'm not a LimeSurvey GmbH employee.
No support via private message.
Replied by holch on topic Languages only accessable for few questions
I personally would find it pretty weird when taking a survey, if the language would switch in the middle of a survey. I mean this is of course your decision and only you know all the background of the study and the participants, but I personally would either go all for english only, or would have the whole survey translated. Just my 2 cents.
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.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 2 months ago #146251
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Languages only accessable for few questions
Yes, the problem with inserting a language switcher in a single group or question is that, if used, the survey would remain in that switched language after submitting the group.
A possible solution in a single group would be to:
1) Create copies of the question, each with text and answers in different languages.
2) Add a single-choice question to the group with the various languages - something like "Choose your preferred language for this question."
3) Place relevance on the copies based on the single-choice question.
A possible solution in a single group would be to:
1) Create copies of the question, each with text and answers in different languages.
2) Add a single-choice question to the group with the various languages - something like "Choose your preferred language for this question."
3) Place relevance on the copies based on the single-choice question.
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DenisChenu
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 13907
- Thank you received: 2546
7 years 2 months ago - 7 years 2 months ago #146254
by DenisChenu
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Replied by DenisChenu on topic Languages only accessable for few questions
Alternative, using 1 language survey
Only for question text, but can be adapted for answers
Screenshots:
Only for question text, but can be adapted for answers
Code:
<div class="panel-group" id="accordion-{QID}" role="tablist" aria-multiselectable="true"> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="heading-en"> <h4 class="panel-title" lang="en" dir="ltr" > <a role="button" data-toggle="collapse" data-parent="#accordion-{QID}" href="#collapse-en" aria-expanded="true" aria-controls="collapse-en"> The English question </a> </h4> </div> <div id="collapse-en" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading-en"> <div class="panel-body bg-primary" lang="en" dir="ltr"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> <div class="panel panel-default"> <div class="panel-heading" role="tab" id="heading-ar"> <h4 class="panel-title text-right" lang="ar" dirt="rtl"> <a class="collapsed" role="button" data-bs-toggle="collapse" data-parent="#accordion-{QID}" href="#collapse-ar" aria-expanded="false" aria-controls="collapse-ar"> The Arabic question </a> </h4> </div> <div id="collapse-ar" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-ar"> <div class="panel-body bg-primary text-right" lang="ar" dirt="rtl"> Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. </div> </div> </div> </div>
Screenshots:
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Attachments:
Last edit: 7 years 2 months ago by DenisChenu. Reason: Screenshots
The following user(s) said Thank You: tpartner, leonhardt
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 2 months ago #146255
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Languages only accessable for few questions
Yup, nice!
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
- DPoth
- Topic Author
- Offline
- New Member
Less
More
- Posts: 18
- Thank you received: 0
7 years 2 months ago #146626
by DPoth
Replied by DPoth on topic Languages only accessable for few questions
First I want to thank you all for your responses!
But I am not really sure how to apply them, since I can't code at all... Further I think that my problem with the other languages is really limited and maybe you can help me with that to.
Actually the problem is limited to a formating issue when inserting english text in to a language layout that writes from right to left (arabic for example).
Because the last "." Always jumps to the beginning of the paragraph. Is there a small command that I can put at the beginning and the end of the paragraph, so that the system does not make this switch?
But I am not really sure how to apply them, since I can't code at all... Further I think that my problem with the other languages is really limited and maybe you can help me with that to.
Actually the problem is limited to a formating issue when inserting english text in to a language layout that writes from right to left (arabic for example).
Because the last "." Always jumps to the beginning of the paragraph. Is there a small command that I can put at the beginning and the end of the paragraph, so that the system does not make this switch?
The topic has been locked.
- tpartner
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 10611
- Thank you received: 3690
7 years 2 months ago #146641
by tpartner
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Replied by tpartner on topic Languages only accessable for few questions
Try wrapping the English text in an element with a "dir" attribute.
Code:
<p dir="ltr">This text should always be left-to-right!</p>
Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
- leonhardt
- Offline
- New Member
Less
More
- Posts: 2
- Thank you received: 0
4 years 5 months ago #189043
by leonhardt
Replied by leonhardt on topic Languages only accessable for few questions
Dear DenisChenu,
thank you for your answer that helped me implement another language in my questionnaire. You said it would be possible to adapt this for multiple choice answers as well. Unfortunately I cannot code myself, so an example like the one you provided before would really help me.
Thanks a lot!
thank you for your answer that helped me implement another language in my questionnaire. You said it would be possible to adapt this for multiple choice answers as well. Unfortunately I cannot code myself, so an example like the one you provided before would really help me.
Thanks a lot!
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12713
- Thank you received: 3924
4 years 5 months ago - 4 years 5 months ago #189079
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Languages only accessable for few questions
Hi,
if you just enter this script into your answer options it works as well.
The only thing is to adapt the id of the accordion "id="accordion-{QID}" and the "data-parent", so that all accordions of the answer options have a unique id. (like "accordion1-{QID}", "accordion2-{QID}")
Anyway: If you want to use this you should make yourself familiar with bootstrap and especially this:
getbootstrap.com/docs/3.3/javascript/#co...se-example-accordion
Copy and paste this example into the answer option:
Joffm
if you just enter this script into your answer options it works as well.
The only thing is to adapt the id of the accordion "id="accordion-{QID}" and the "data-parent", so that all accordions of the answer options have a unique id. (like "accordion1-{QID}", "accordion2-{QID}")
Anyway: If you want to use this you should make yourself familiar with bootstrap and especially this:
getbootstrap.com/docs/3.3/javascript/#co...se-example-accordion
Copy and paste this example into the answer option:
Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 4 years 5 months ago by Joffm.
The following user(s) said Thank You: DenisChenu
The topic has been locked.