K
K
KIN19912015-06-03 13:05:58
Django
KIN1991, 2015-06-03 13:05:58

How to add your own language code (for example ru,en) to Django?

Hello everyone, there is a problem, in Dzhang the Kazakh language code is marked as kk, how can I change this? or say add your code?
Easy to install

LANGUAGES = (
    ('ru', _('Russian')),
    ('kz', _('Kazakh')),
)

It doesn’t work with kz gives 404, but with kk everything is fine

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
marazmiki, 2015-06-03
@KIN1991

All registered locales are specified in the LANG_INFO dictionary found in the django.conf.locale package.
Can. for example, make an application that, at startup, will do something like this:

from django.conf.locale import LANG_INFO
LANG_INFO['kz'] = LANG_INFO['kk']

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question