{%- if pagename == "index" %}
   {% set page_path = "" %}
{% elif file_suffix == '' %}
   {% set tempagename = pagename + "/" %}
{% else %}
   {% set page_path = pagename %}
{% endif %}

{%- if theme_project == 'manual' %}
   {% set page_uri = theme_manual_path + "/" + page_path %}
{%- elif theme_project == 'ecosystem' %}
   {% set page_uri = theme_project + "/" + page_path %}
{%- elif theme_project == 'meta-driver' %}
   {% set page_uri = theme_project + "/" + theme_manual_path + "/" + page_path %}
{%- endif %}

<h3><a href="{{ pathto('/meta/translation') }}">Translations</a></h3>
<ul class="translation-menu">
{%- for lc,lang in theme_translations -%}
    <li><a href="http://{{lc}}.docs.mongodb.org/{{ page_url }}" rel="nofollow" hreflang="{{lc}}" title="{{html_short_title}} in {{lang}}">{{lang}}</a></li>
{% endfor -%}
</ul>
