Quiz

{% if translations is defined %} {% for translation in translations %}

{{ translation.word1 }}

{% set correctAnswer = translation.word2 %} {% set otherTranslations = [translation.word2, translations[0].word2, translations[1].word2, translations[2].word2] %} {{ correctAnswer }}
{% for otherTranslation in otherTranslations %} {% if otherTranslation != correctAnswer %} {{ otherAnswer }}
{% endif %} {% endfor %} {% endfor %} {% endif %} {% if submitted %} {% if isCorrect %}

Correct answer!

{% else %}

Wrong answer!

{% endif %} {% endif %}

Translator

{% if translations is defined %} {% for translation in translations %} {% endfor %} {% endif %}