pinax i18n problem

8 views
Skip to first unread message

ode

unread,
Nov 22, 2009, 8:45:42 PM11/22/09
to Pinax Users
hi all,

Seems modify " LANGUAGE_CODE = 'zh' " takes no effect. The admin
interface is still in English. I'm using Pinax-0.7.1-bundle.
Does anyone encounter the same problem with me? What's the solution.

Thanks.

Jannis Leidel

unread,
Nov 23, 2009, 4:10:58 AM11/23/09
to pinax...@googlegroups.com
By default Pinax uses a LocaleMiddleware that discovers the language as described here: http://docs.djangoproject.com/en/dev/topics/i18n/#id2, although it does additionally lookup a special field in the account model in case a user saved his language preference.

Is your browser using the "en" locale? Does deleting the session cookie clear the language?

Jannis

Fu Jiantao

unread,
Nov 23, 2009, 4:21:02 AM11/23/09
to pinax...@googlegroups.com
Accept-Language: zh-CN,zh;q=0.8

The above is what I saw when using wireshark to collect the packets.

The problem seems very strange, The login page of the admin is in Chinese, but after logining into the admin interface, all page is in English, I didn't encounter the problem when I created my own project using django-admin.py.

2009/11/23 Jannis Leidel <jan...@leidel.info>

--

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



Fu Jiantao

unread,
Nov 23, 2009, 7:56:13 AM11/23/09
to pinax...@googlegroups.com
Problem solved!!

The reason is , language preference is saved in Account table. I create superuser during syncdb, the default language is en-us, so when I modified the language preference later, it doesn't work as what I'm excepting, for the language preference is fetched from the database. 

I think Pinax SHOULD improve this problem , It seems so strange that I follow the trace and read the fucking code to solve the problem.

2009/11/23 Fu Jiantao <fuj...@gmail.com>

Daniel Greenfeld

unread,
Nov 23, 2009, 9:38:03 AM11/23/09
to pinax...@googlegroups.com
Fu Jiantao,

That sort of language is inappropriate.

FYI, Pinax is still young, at version 0.7.1 and is in the process of
having its internationalization revamped. That is not a small effort.
If you want to help contribute to Pinax's internationalization we
would welcome you.

Daniel Greenfeld
--
'Knowledge is Power'
Daniel Greenfeld
http://pydanny.blogspot.com
http://dannygreenfeld.blogspot.com

Fu Jiantao

unread,
Nov 23, 2009, 10:06:32 AM11/23/09
to pinax...@googlegroups.com
Apologize for what I've said, actually I think pinax it's the best practice of django, I've been studying it these days. Compared to Django, Pinax lacks documentation. Many Open Source Django Apps face the same problem. Pinax integrates lots of good app, It  have done an excellent job, I really hope it can do better and better.

I've been done some localization job for it these days. And I will be glad if I can make some contributition to the Community.

2009/11/23 Daniel Greenfeld <pyd...@gmail.com>

Daniel Greenfeld

unread,
Nov 23, 2009, 12:46:20 PM11/23/09
to pinax...@googlegroups.com
Hey Fu Jiantao,

Django is at 1.2 and things aren't changing much. Pinax is still at
0.7.1 and things are changing quite a bit. Between dot releases we
don't promise backwards compatibility because we aren't at 1.0 too
much. So that means we are constantly playing a game of documentation
catch-up. As we get closer to Pinax 1.0 you'll see our documentation
expand rapidly in quantity and quality.

Of course, if you want to help with that documentation, that would be
appreciated. The issue that you found could certainly make it into the
Sphinx/RestructedText docs so no one else but you has to look through
code to make the same problem work.

Daniel Greenfeld

Fu Jiantao

unread,
Nov 23, 2009, 8:59:09 PM11/23/09
to pinax...@googlegroups.com
Daniel,

Two questions.

1. how to contribute?

2. I've saw your tutorial slide about Pinax. Where can I find the source code of "flash mob dance orgnaizer site"? 

Thanks.

2009/11/24 Daniel Greenfeld <pyd...@gmail.com>

Daniel Greenfeld

unread,
Nov 30, 2009, 10:46:29 AM11/30/09
to pinax...@googlegroups.com
On Mon, Nov 23, 2009 at 8:59 PM, Fu Jiantao <fuj...@gmail.com> wrote:
> Daniel,
> Two questions.
> 1. how to contribute?
> 2. I've saw your tutorial slide about Pinax. Where can I find the source
> code of "flash mob dance orgnaizer site"?
> Thanks.

Fu Jiantao,

To contribute:

http://code.pinaxproject.com/wiki/HowToContribute/

The source code for the flash mob dance organizer site is in these
three packages:

http://github.com/pydanny/pinax-wall
http://github.com/pydanny/pinax-dances

Those packages are not at all ready for production. I may get around
to updating them as part of my preparation for US Pycon 2010.

Danny

Joseph Turian

unread,
Nov 30, 2009, 3:25:19 PM11/30/09
to Pinax Users
Fu,

> 1. how to contribute?

Documentation! Like you said!

I am a Pinax beginner, so each time I figure something out that is not
well documented, I write the documentation.
I then put it on the wiki at http://code.pinaxproject.com/

If you write documentation, then it encourages more beginners to get
involved with the project, and will make the project stronger long
term.
Reply all
Reply to author
Forward
0 new messages