Switch templates for different languages

More
5 years 7 months ago #71187 by socius
socius created the topic: Switch templates for different languages
Hi,

I'd like to switch templates according to the (by languageswitch) chosen survey language, to show different pictures, layout, or an imprint outside the standard-texts in the correct language. I didn't find an "easy" solution for this - I hope I didn't miss the answer searching this forum and the workarounds. (I'm not a programmer, unfortunately - so if this is just trivial or impossible, I didn't know :)

thank you very much for help!
g

Please Log in to join the conversation.

More
5 years 7 months ago #71196 by tpartner
tpartner replied the topic: Switch templates for different languages
You can't switch templates dynamically but the <body> element is given a class depending on the language (.lang-en, .lang-nl, .lang-fr...).

In template.css, you can apply rules based on these classes to hide or show elements as desired.

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: socius

Please Log in to join the conversation.

More
5 years 6 months ago #71281 by bwoo5
bwoo5 replied the topic: Switch templates for different languages
You could make a one question survey asking the language, then based on the language choice use some code that will populate the load url at end of survey (then use the option to auto load url on survey completion) with the link to survey in different languages. Each of the different surveys can then have their own template.

Your other choice is just to have a simple html page that says "Please choose your language". Then have the languages listed and hyperlinks that link to each of the individual surveys in the language of choice with the different templates.
The following user(s) said Thank You: socius

Please Log in to join the conversation.

More
5 years 6 months ago #71282 by Ben_V
Ben_V replied the topic: Switch templates for different languages
Hi,

for media=screen:

1) Set a basic template.css more or less valid for all languages.
2) and link to a complementary stylesheet, for example using the source of the survey description for each language:
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}lang/en.css" />
<link rel="stylesheet" type="text/css" href="{TEMPLATEURL}lang/es.css" />
etc.

BTW, have a look here
Ben

Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
The following user(s) said Thank You: socius

Please Log in to join the conversation.

More
5 years 6 months ago #71308 by socius
socius replied the topic: Switch templates for different languages
Great - thank you for your help! I'll try both solutions.

Thanks!
g

Please Log in to join the conversation.

More
5 years 6 months ago #71833 by Mazi
Mazi replied the topic: Switch templates for different languages
socius, if you succeeded to set this up, please document your solution at manual -> workarounds.

Thanks!


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

More
5 years 6 months ago #72521 by socius
socius replied the topic: Switch templates for different languages
Hi mazi,

I couldn't check the css-version yet, but probably will in may. workaround comes then.

thanks!
g

Please Log in to join the conversation.

More
5 years 6 months ago #72523 by Mazi
Mazi replied the topic: Switch templates for different languages
Thanks for your feedback, I'm looking forward to your solutuion.


Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)survey-consulting.com'"

Please Log in to join the conversation.

Did you already participate in our customer survey?

Don't miss your chance for great prices.

Please click here to participate:

Start now

Start now!

Just create your account and start using Limesurvey today.

Register now