Language detection in template files

Plus d'informations
il y a 5 ans 10 mois #73436 par tacman1123
tacman1123 a créé le sujet : Language detection in template files
I want to use a different logo, depending on the language. Is there a way to display a logo conditionally? Something like

<img src="/images/{if(LANGUAGE=='en','en_logo','other_logo')}.png" />

Except I don't think there's a keyword LANGUAGE.

Gracias,

Tac

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 10 mois #73454 par Mazi
Mazi a répondu au sujet : Language detection in template files
It might be possible by adjusting this workaround: docs.limesurvey.org/The+template+editor&...age_specific_element


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'"

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 10 mois #73472 par tacman1123
tacman1123 a répondu au sujet : Language detection in template files
Thanks -- what are the better solutions in 1.92? I'm guessing Expression Manager gives us a bit more power. The old way of writing javascript to customize a question never felt right, but the new way is quite elegant.

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 10 mois #73474 par TMSWhite
TMSWhite a répondu au sujet : Language detection in template files
There is a {LANG} keyword, so you could do this:
<img src="/images/{if(LANG=='en','en_logo','other_logo')}.png" />

or, since you should know all possible languages your survey uses:
<img src="/images/{LANG}_logo.png" />
Les utilisateur(s) suivant ont remercié: tacman1123

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 10 mois #73478 par tacman1123
tacman1123 a répondu au sujet : Language detection in template files
Perfect, thanks! Where are the keywords documented? I found the if() syntax while looking at something else, is there more documentation on what the template language can do, like loops or more sophisticated if structures, like Smarty or Twig?

I'm a big fan of both Smarty and Twig, and would be thrilled if LS2.0 consider using them. They're quite fast and have great support.

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 10 mois #73481 par Mazi
Mazi a répondu au sujet : Language detection in template files
Tom, I couldn't find the {LANG} keyword at one of those lionks:
docs.limesurvey.org/The+template+editor&...+LimeSurvey#Keywords
docs.limesurvey.org/Expression+Manager+H...tions+for+LimeSurvey
docs.limesurvey.org/Expression+Manager+f...tions+for+LimeSurvey

...but I remember you once created a keyword overview. Is this still available and do you think we can place that somewhere else at the manual so that users know which placeholders they can deal with?

@tacman: We are now moving all code to the MVC framework "Yii" for the Limesurvey 2.0 release so such thing is not on the list yet but we hope to lay the basics for it this way.
You can add this as a feature request at our feature tracker . Please describe your idea as detailed as possible and try to outline a suitable solution/implementation as well.


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'"

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 10 mois #73498 par TMSWhite
TMSWhite a répondu au sujet : Language detection in template files
Here is the list of keywords from the last analysis I did. Someone should update the documentation to list any missing ones.

As to documentation about the if() syntax, etc., there is an EM button within 1.92 under survey-specific tools that generates a table of all of the supported functions and their documentation. This table in the main EM documentation should also be up-to-date.

Connexion pour participer à la conversation.

Plus d'informations
il y a 5 ans 10 mois #73513 par Mazi
Mazi a répondu au sujet : Language detection in template files
Can we somehow make the list of keywords a little smaller so that it is easier to read and easier to embedd at the documentation?
Maybe separate it into sections (template placeholders, token placeholders, ...)?


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'"

Connexion pour participer à la conversation.

Plus d'informations
il y a 2 ans 9 mois #117984 par jelo
jelo a répondu au sujet : Language detection in template files

Mazi écrit: Can we somehow make the list of keywords a little smaller so that it is easier to read and easier to embedd at the documentation?
Maybe separate it into sections (template placeholders, token placeholders, ...)?

Where is the keyword list now? 90% of the links are lost and the Wiki is just redirecting to main page instead of offering best matches or trying to recreate a temp link. The search isn't helping either.

Connexion pour participer à la conversation.

Plus d'informations
il y a 2 ans 9 mois #117985 par tpartner
tpartner a répondu au sujet : Language detection in template files

Cheers,
Tony Partner
Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.

Connexion pour participer à la conversation.

Plus d'informations
il y a 2 ans 9 mois #117989 par jelo
jelo a répondu au sujet : Language detection in template files
Thanks, wonder why the search wasn't showing that page.

Connexion pour participer à la conversation.

Commencez dès maintenant !

Créez simplement un compte et commencez à utiliser LimeSurvey dès aujourd'hui.

Inscrivez-vous maintenant

Inscrivez-vous à notre Newsletter!