Hello!
Short version of question: Does django have de-at(Austrian version of Deutsch) and how can I define it?
I need to create website with 2 languages (standart Deutsch and Austrian version)
There is one problem, setting in settings.py :
Everything is set: contextprocessor, i18n is True, localemiddleware is set.
In my template:
). Doesn't matter I'll choose first Deutsch(de)- Austrian version or second - original Deutsch django translates website in standard Deutsch.
Short version of question: Does django have de-at(Austrian version of Deutsch) and how can I define it?
I need to create website with 2 languages (standart Deutsch and Austrian version)
There is one problem, setting in settings.py :
LANGUAGES = (
('en', _('English')),
('de', _('German')),
('de-at', _('Austrian'))
)doesn't work.Everything is set: contextprocessor, i18n is True, localemiddleware is set.
In my template:
<form action="{% url 'set_language' %}" method="post">
{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}" />
<select style="border:1px dotted black" name="language">
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
<option value="{{ language.code }}"{% if language.code == LANGUAGE_CODE %} selected="selected"{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<input class="btn-primary" type="submit" value="{% trans 'Change' %}" />
</form>Using documentation - creates select dropdown menu with languages, where de-at and de versions are equal, I mean, that django defines them as same languages. I made makemessages -l de_AT- doesn't work, tried -
makemessages -l de-at- same. On template side there are 3 languages: english and 2 Deutsch(de)(no sublanguages
). Doesn't matter I'll choose first Deutsch(de)- Austrian version or second - original Deutsch django translates website in standard Deutsch.
