
{% set links = [
  {url: selected_lang != 'en' ? '/articles/' : null,         label: "lang_en"|lang},
  {url: selected_lang != 'ru' ? '/articles/?lang=ru' : null, label: "lang_ru"|lang},
] %}
{% if is_admin %}
  {% set links = links|merge([{
    url: '/articles/write/?lang='~selected_lang,
    label: "write"|lang
  }]) %}
{% endif %}

<div class="blog-item-right-links">
  {% for link in links %}
    {% if loop.index > 1 %}
      <span class="blog-links-separator">|</span>
    {% endif %}
    {% if link.url %}
      <a href="{{ link.url }}">{{ link.label }}</a>
    {% else %}
      {{ link.label }}
    {% endif %}
  {% endfor %}
</div>
