Yes I'm aware of this thanks. However, the documentation also states that I 
can activate a different language in my custom command:

*If, for some reason, your custom management command needs to use a fixed 
locale different from ‘en-us’, you should manually activate and deactivate 
it in your handle() 
<https://docs.djangoproject.com/en/1.6/howto/custom-management-commands/#django.core.management.BaseCommand.handle>
 or handle_noargs() 
<https://docs.djangoproject.com/en/1.6/howto/custom-management-commands/#django.core.management.NoArgsCommand.handle_noargs>
 method 
using the functions provided by the I18N support code:*


Using the code:

        # Activate a fixed locale, e.g. Russian
        translation.activate('ru')


However, this doesn't appear to change anything.

On Thursday, 19 June 2014 08:38:31 UTC-4, Tom Evans wrote:
>
> On Wed, Jun 18, 2014 at 7:10 PM, Stodge <[email protected] <javascript:>> 
> 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 [email protected].
To post to this group, send email to [email protected].
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/921eb300-98ca-43d8-b9a8-b23302449f11%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to