{%- for lng in languages.split(' ') %}
{%- if lng == language %}
{%- else %}
{# just a hack to keep the current url for English docs; they start at www.mapserver.org/ instead of www.mapserver.org/ #}
{% if target == 'mapserverorg' %}
{% if lng == 'en' %}
{% else %}
{% endif %}
{% else %}
{% endif %}
{%- endif %}
{%- endfor %}
{{ super() }}
{% endblock %}
{# create a custom sidebar TOC -> see the templating reference http://sphinx.pocoo.org/templating.html#working-with-the-builtin-templates #}
{% block sidebartoc %}