Switch to : {% for locale in locales %} {% if loop.index > 1 %} | {% endif %}{{ locale.locale_target_language }} {% endfor %}