How to override django admin translation?

I am trying to override the default translation of the Django admin site.

I am using Django 1.6. My settings.py file contains:

import os BASE_DIR = os.path.dirname(os.path.dirname(__file__)) # ... LANGUAGE_CODE = 'nl' USE_I18N = True USE_L10N = True LOCALE_PATHS = (os.path.join(BASE_DIR, "locale"),) 

I copied the file django/contrib/admin/locale/nl/LC_MESSAGES/django.po to my_project/locale/nl/LC_MESSAGES/django.po and made some changes to it.

Then I ran python manage.py compilemessages and python manage.py runserver .

However, when I visit localhost:8000/admin , I still see the default localhost:8000/admin translations in Django. What am I doing wrong?

Edit - I found a problem:

The above description is the correct way to override application translations. I followed my own instructions and they work. The reason for my problem was that I accidentally missed the nl subdirectory for the first time. I am a stupid person.

+13
source share

All Articles