How do I add my own language code (eg ru, en) to Django?

  • 0
    Hello everyone, there is a problem, in Dzhang the Kazakh language code is marked as kk, how can this case be changed? or say add your own code?
    Just install
        ('ru', _('Russian')),
        ('kz', _('Kazakh')),

    It doesn't work with kz it gives 404 and with kk all the rules
    Django Anonymous, Sep 8, 2020

  • 1 Answers
  • 0
    All registered locales are listed in the LANG_INFO dictionary 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']
    Dominic Mills

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!