unable to create en-gb for localisation

34 views
Skip to first unread message

Aaron Lee

unread,
Apr 22, 2010, 2:48:16 PM4/22/10
to Django users
Hi,

I am trying to create a UK version of my site and ran into some problems.
I am manually setting my LANGUAGE_CODE to 'en-gb' and use
django-admin.py makemessages -l en-gb and then run compilemessages

For some reason it's not picking up the localised string, I am pretty sure my setup is correct because I did the same experiment for uk (Ukraine).

Looking at Django's conf/locale I couldn't find an example of Great Britain English translation setup. Any idea what may go wrong? Thanks

-Aaron

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Ramiro Morales

unread,
Apr 22, 2010, 3:24:47 PM4/22/10
to django...@googlegroups.com
On Thu, Apr 22, 2010 at 3:48 PM, Aaron Lee <waif...@gmail.com> wrote:
> Hi,
>
> I am trying to create a UK version of my site and ran into some problems.
> I am manually setting my LANGUAGE_CODE to 'en-gb' and use
> django-admin.py makemessages -l en-gb and then run compilemessages
>
> For some reason it's not picking up the localised string, I am pretty sure
> my setup is correct because I did the same experiment for uk (Ukraine).
>
> Looking at Django's conf/locale I couldn't find an example of Great Britain
> English translation setup. Any idea what may go wrong? Thanks

Make sure you are creating a stub en-gb translation for Django. See the
second note box ("Locale restrictions") here:

http://docs.djangoproject.com/en/1.1/topics/i18n/localization/#topics-i18n-localization

--
Ramiro Morales | http://rmorales.net

Daniel Roseman

unread,
Apr 22, 2010, 3:28:50 PM4/22/10
to Django users
On Apr 22, 7:48 pm, Aaron Lee <waifun...@gmail.com> wrote:
> Hi,
>
> I am trying to create a UK version of my site and ran into some problems.
> I am manually setting my LANGUAGE_CODE to 'en-gb' and use
> django-admin.py makemessages -l en-gb and then run compilemessages
>
> For some reason it's not picking up the localised string, I am pretty sure
> my setup is correct because I did the same experiment for uk (Ukraine).
>
> Looking at Django's conf/locale I couldn't find an example of Great Britain
> English translation setup. Any idea what may go wrong? Thanks
>
> -Aaron

I suspect the issue is this (from http://docs.djangoproject.com/en/1.1/topics/i18n/localization/):
"Django does not support localizing your application into a locale for
which Django itself has not been translated. In this case, it will
ignore your translation files."

--
DR.

Aaron Lee

unread,
Apr 22, 2010, 3:29:25 PM4/22/10
to django...@googlegroups.com
Thanks, for some reason en_GB works (but not en-gb) and I don't see a en_GB stub under django/conf/locale. So it seems it works in a mysterious way

-Aaron
Reply all
Reply to author
Forward
0 new messages