python - How to change language on the template in django-rosetta -
i installed django-rosetta in project. created .po , .mo files. template have code shows text translated in django-rosetta (from django docs). how create link direct each of translated pages?
{% get_current_language language_code %} <!-- current language: {{ language_code }} --> <p>{% trans "welcome our page" %}</p> <p>{{ language_code }}</p> {% language 'pl' %} {% get_current_language language_code %} <p>{% trans "some text translate" %}</p> {% endlanguage %} {% language 'en' %} {% get_current_language language_code %} <p>{% trans "some text translate" %}</p> {% endlanguage %} {% language 'ru' %} {% get_current_language language_code %} <p>{% trans "some text translate" %}</p> {% endlanguage %}
Comments
Post a Comment