Wednesday, July 30, 2014

Re: internationalization (i18n)

Here's a list of locales in Django:

Am Mittwoch, 30. Juli 2014 14:47:03 UTC+2 schrieb

have a look at:

The localization in django is based on region and language codes, some of them are the same (like 'de') and some split (like 'en-us'). For 'mr' you'll need to add the area code of india iirc.


Am Mittwoch, 30. Juli 2014 14:31:37 UTC+2 schrieb Supriya Sawant:


  I am using internationalization feature in djnago framework.
  In my I have following languages set:

    ('de', ugettext('German')),('en', ugettext('English')),('mr', ugettext('Marathi')),('mwr', ugettext('Marwari')),('mun', ugettext\
('Munda')),('ne', ugettext('Nepali')),('ori', ugettext('Oriya')),('pi', ugettext('Pali')),('pa', ugettext('Panjabi')),('raj', ugette\
xt('Rajasthani')),('sa', ugettext('Sanskrit')),('sat', ugettext('Santali')),('sd', ugettext('Sindhi')),('ta', ugettext('Tamil')),('t\
e', ugettext('Telugu')),('ur', ugettext('Urdu')),('as', ugettext('Assamese')),('awa', ugettext('Awadhi')),('ber', ugettext('Bengali'\
)),('bho', ugettext('Bhojpuri')),('bh', ugettext('Bihari')),('bra', ugettext('Braj')),('gon', ugettext('Gondi')),('dra', ugettext('D\
ravidian')),('gu', ugettext('Gujarati')),('en', ugettext('English')),('him', ugettext('Himachali')),('hi', ugettext('Hindi')),('kn',\
 ugettext('Kannada')),('ks', ugettext('Kashmiri')),('kha', ugettext('Khasi')),('kok', ugettext('konkani')),('kru', ugettext('Kurukh'\
)),('lah', ugettext('Lahnda')),('lus', ugettext('Lushai')),('mag', ugettext('Magahi')),('mai', ugettext('Maithili')),('mi', ugettext\
('Malayalam')),('mni', ugettext('Manipuri')),('fr', ugettext('French')),('ja', ugettext('Japanese')),('da', ugettext('Danish')),('es\
', ugettext('Spanish')),('it', ugettext('Italian')),('ru', ugettext('Russian')),

I  have created th po file .

but while runserver I am getting following error:

raise KeyError("Unknown language code %s." % lang_code)
KeyError: u'Unknown language code mr.'

what would be the reason.

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment