On Wed, Jun 18, 2014 at 7:10 PM, Stodge <sto...@gmail.com> wrote: > By override I mean I add this at the start of my handle() function in my > custom management command: > > from django.utils import translation > translation.activate(settings.LANGUAGE_CODE) > > Where settings.LANGUAGE_CODE = "en-gb". > > Calling get_language in my custom management command still returns "en-us". >
In a management command, django will always set the language to "en-us": https://docs.djangoproject.com/en/1.6/howto/custom-management-commands/#management-commands-and-locales Cheers Tom . -- 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+unsubscr...@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/CAFHbX1KpHbTVdGCfG6UWzK6kpOk2dn%2Bm0F697gFz2N5spOjdFg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.