title: Django templates: Get current URL in another language
body: <p>I'm using <code>i18n_patterns</code> to create language prefixes in a Django app.</p>
  
  <p>My URLs look like this:</p>
  
  <pre><code>/de/contact/
  /fr/contact/
  /it/contact/
  </code></pre>
  
  <p>In my base template, I'm looping over all available languages to show the language switch links.</p>
  
  <pre><code>{% get_available_languages as languages %}
  &lt;nav id="language_chooser"&gt;
      &lt;ul&gt;
          {% for lang_code, lang_name in languages %}
              {% language lang_code %}
              &lt;li&gt;&lt;a href="{% url 'home' %}" alt="{{ lang_name }}" title="{{ lang_name }}"&gt;{{ lang_code }}&lt;/a&gt;&lt;/li
              {% endlanguage %}
          {% endfor %}
      &lt;/ul&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>In this case, I'm reversing the "home" URL. Is there a way to get a translated URL of the current page instead?</p>
  
  <p>If I'm on the German version of my "contact" page, I want the "fr" link to point to the French version of the "contact" page, not to the "home" page.</p>