Refer to survey language in question

More
2 months 4 days ago #196111 by Jmantysalo
release_notes.txt says "New feature #4661 : add some placeholder : {SURVEYLANG}, {SURVEYFORMAT}, {SURVEYCONTACT}". If I put "{SURVEYCONTACT}" to a question text, it works, but "{SURVEYLANG}" does not. What is the right variable for survey language?

(Actually I want a logo to depend on language, but this should be a step towards it.)

Please Log in to join the conversation.

LimeSurvey Partners
More
2 months 4 days ago #196114 by Joffm
Hi,
For your first question I only know {LANG} which returns the code of the language.

Okay, the second:
In your "custom.css"
body.lang-en img.logo-de {
	display: none;
}
 
body.lang-de img.logo-en {
	display: none;
}

and in "nav-bar.twig"

{{ image('./files/myLogoForEnglish.png', 'alt-text for my file', {"class": "logo-en"}) }}
{{ image('./files/myLogoForGerman.png', 'alt-text for my file', {"class": "logo-de"}) }}


Joffm


Volunteers are not paid.
Not because they are worthless, but because they are priceless

Please Log in to join the conversation.

More
2 months 4 days ago #196117 by Jmantysalo
Thanks. {LANG} works.

About logo: is it possible to have default logo (i.e. English) for those languages that have no own logos (in my cases, all others than Finnish).

Please Log in to join the conversation.

More
1 month 3 weeks ago #197028 by Jmantysalo
Answering to myself: I end up having

{{ image('./files/tunilogo_fi.png', aSurveyInfo.name, {"class": "logo-fi"}) }}
{{ image('./files/tunilogo_en.png', aSurveyInfo.name, {"class": "logo-en"}) }}

at nav_bar.twig and on custom.css

:not(:lang(fi)) .logo-fi { display: none; }
:lang(fi) .logo-en { display: none; }

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now