(demo included) Switching Languages still relies on LANGUAGE_CODE for forms

12 views
Skip to first unread message

Houmie

unread,
Aug 14, 2012, 10:59:44 AM8/14/12
to django...@googlegroups.com
Hello,

I have created a small demo to show the problem. Please open the demo here: http://sandbox.chasebot.com/

When you click on British English, you can see how both the date- and Time format change.

Now if you click on Add, you will see how both date and time are pre-populated for you.  However they still carry the American date format, instead of the British language selection.

The only way to fix that was to change LANGUAGE_CODE = 'en-us' to LANGUAGE_CODE = 'en-gb' in settings.py.
This approach would be obviously useless.

I have created formats.py to override the 'en' and 'en_GB' so I am clueless what else I could do.

Please be so kind and download my demo (22 kb) from my dropbox: https://dl.dropbox.com/u/44307777/Sandbox.zip
All you have to do is to edit settings.py and adjust the path to sqlite.db to your path.

Have I overlooked something or is this a Django bug?

Many Thanks for your help,
Houman
Reply all
Reply to author
Forward
0 new messages