manage.py makemessages -l si
manage.py compilemessages
When i goes to admin URL with sinhala language its working fine i try get all supported language give this error
<form action="{% url 'set_language' %}" method="post">{% csrf_token %}
<input name="next" type="hidden" value="{{ redirect_to }}" />
<select 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{% endif %}>
{{ language.name_local }} ({{ language.code }})
</option>
{% endfor %}
</select>
<input type="submit" value="Go" />
</form>
'Unknown language code si.'
Request Method: | GET |
---|---|
Request URL: | http://localhost.test:8000/accounts/login/ |
Django Version: | 2.0.4 |
Exception Type: | KeyError |
Exception Value: | 'Unknown language code si.' |
Exception Location: | E:\HiveProject\DjangoWeb\lib\site-packages\django\utils\translation\__init__.py in get_language_info, line 244 |
Python Executable: | E:\HiveProject\DjangoWeb\Scripts\python.exe |
Python Version: | 3.6.4 |
Python Path: | ['E:\\HiveProject\\DjangoWeb\\hive', 'E:\\HiveProject\\DjangoWeb\\Scripts\\python36.zip', 'E:\\HiveProject\\DjangoWeb\\DLLs', 'E:\\HiveProject\\DjangoWeb\\lib', 'E:\\HiveProject\\DjangoWeb\\Scripts', 'c:\\python36\\Lib', 'c:\\python36\\DLLs', 'E:\\HiveProject\\DjangoWeb', 'E:\\HiveProject\\DjangoWeb\\lib\\site-packages'] |
Server time: | Mon, 30 Apr 2018 06:34:03 +0000 |