Wrong language in django admin

5.1k views Asked by At

Why is django.contrib.admin in English even though I set LANGUAGE_CODE = 'pl' in the settings?

LANGUAGE_CODE = 'pl'

TIME_ZONE = 'Europe/Warsaw'

USE_I18N = True

USE_L10N = True

USE_TZ = False

LANGUAGES = (
    ('en', _('English')),
    ('pl', _('Polish')),
)

Deleting ('en', _('English')), from LANGUAGES helps but I need it from django-rosetta.

Thank you.

2

There are 2 answers

0
chandu On

Simply add this in your settings file.I tested it and works fine.

 LANGUAGE_CODE = 'pl'

When user logged in django admin needs it shows polish by default.Some words are shown in english. Still problem is not solved share the screen shot of the django admin.

5
chandu On

This function can be used in your root URLconf and Django will automatically prepend the current active language code to all url patterns defined within i18n_patterns()

  urlpatterns += i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),
)

Source: How can I change Django admin language?