diff options
| author | Georg Bauer <gb@hugo.westfalen.de> | 2005-10-01 16:45:16 +0000 |
|---|---|---|
| committer | Georg Bauer <gb@hugo.westfalen.de> | 2005-10-01 16:45:16 +0000 |
| commit | bd9cb4c9f45ab6b26359cacc2dc6a44ec58f21ff (patch) | |
| tree | fefb5cdadc398a78f031a023c011838b8b76a316 | |
| parent | 009694db63b8c3d30dc4f07110169c4bf48a3de6 (diff) | |
i18n: fixed a rather stupid bug in language discovery (sort descending by preference value instead ascending)
git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@762 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/utils/translation.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation.py b/django/utils/translation.py index 40246e311d..b776023466 100644 --- a/django/utils/translation.py +++ b/django/utils/translation.py @@ -200,7 +200,7 @@ def get_language_from_request(request): return (lang, order) langs = [_parsed(el) for el in accept.split(',')] - langs.sort(lambda a,b: cmp(a[1], b[1])) + langs.sort(lambda a,b: -1*cmp(a[1], b[1])) globalpath = os.path.join(os.path.dirname(settings.__file__), 'locale') |
