Wednesday, July 30, 2014

Re: internationalization (i18n)

Hi,

have a look at: http://www.i18nguy.com/unicode/language-identifiers.html

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.

Cheers

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

Hello,

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

LANGUAGES = (
    ('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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/56de9898-9119-45fc-8abe-dd2f0ed91bfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment