- Posts: 348
- Thank you received: 41
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Refer to survey language in question
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
Less
More
4 years 3 weeks ago #196111
by Jmantysalo
Refer to survey language in question was created 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.)
(Actually I want a logo to depend on language, but this should be a step towards it.)
The topic has been locked.
- Joffm
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 12916
- Thank you received: 3975
4 years 3 weeks ago #196114
by Joffm
Volunteers are not paid.
Not because they are worthless, but because they are priceless
Replied by Joffm on topic Refer to survey language in question
Hi,
For your first question I only know {LANG} which returns the code of the language.
Okay, the second:
In your "custom.css"
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
For your first question I only know {LANG} which returns the code of the language.
Okay, the second:
In your "custom.css"
Code:
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
The topic has been locked.
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 348
- Thank you received: 41
4 years 3 weeks ago #196117
by Jmantysalo
Replied by Jmantysalo on topic Refer to survey language in question
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).
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).
The topic has been locked.
- Jmantysalo
- Topic Author
- Offline
- Platinum Member
Less
More
- Posts: 348
- Thank you received: 41
4 years 1 week ago #197028
by Jmantysalo
Replied by Jmantysalo on topic Refer to survey language in question
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; }
{{ 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; }
The topic has been locked.