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".
On Wednesday, 18 June 2014 13:58:05 UTC-4, James Bennett wrote:
>
> On Wed, Jun 18, 2014 at 10:21 AM, Stodge <[email protected] <javascript:>>
> wrote:
>
>> Even when I override the language code in my custom command
>> get_language() still returns "en-us". Weird. Guess I'll have to use
>> settings.LANGUAGE_CODE instead of get_language().
>>
>
> Define what you mean by "override the language code". Are you doing what
> the documentation you linked to says to do in order to activate the locale
> you want?
>
--
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/277681e8-81c0-466f-814e-e55b8315019c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.