Answer the question
In order to leave comments, you need to log in
How to combine FlatPages and Internationalization?
Good day.
I have a multilingual(2) Django-Oscar project. In it I need to add FlatPages. It is not a problem to add them, but when I change the language, the code of the selected language is not added to the static page url, respectively 404. In which direction should I dig?
Here is the form code for switching languages:
<form id="language_selector" class="navbar-left navbar-form" action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<input name="next" type="hidden" value="{{ language_neutral_url_path }}" />
{% for language in LANGUAGES %}
<input type="radio" name="language" id="language_{{ language.0 }}" value="{{ language.0 }}" class="hide language-select-input">
<label for="language_{{ language.0 }}" class="language-btn {% if language.0 == LANGUAGE_CODE%} selected link_site_style{% endif %}">
<button type="button">{{ language.1 }}</button>
</label>
{% endfor %}
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question