diff options
| author | Bouke Haarsma <bouke@webatoom.nl> | 2013-11-12 07:54:01 +0100 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2014-02-26 16:58:04 +0100 |
| commit | 2bab9d6d9ea095c4bcaeede2df576708afd46291 (patch) | |
| tree | 8225995e22d76818f9659ceff5629a30d4a38d2d /docs | |
| parent | 48a8b714d49d7a4ceee66473aea72c2d8c84a672 (diff) | |
Fixed #21389 -- Accept most valid language codes
By removing the 'supported' keyword from the detection methods and only relying
on a cached settings.LANGUAGES, the speed of said methods has been improved;
around 4x raw performance. This allows us to stop checking Python's incomplete
list of locales, and rely on a less restrictive regular expression for
accepting certain locales.
HTTP Accept-Language is defined as being case-insensitive, based on this fact
extra performance improvements have been made; it wouldn't make sense to
check for case differences.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/releases/1.7.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index 4d12a58e72..aef8842e36 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -1125,6 +1125,14 @@ Miscellaneous For example, if you use multi-inheritance, you need to define custom primary key fields on parent models, otherwise the default ``id`` fields will clash. +* :meth:`~django.utils.translation.parse_accept_lang_header` now returns + lowercase locales, instead of the case as it was provided. As locales should + be treated case-insensitive this allows us to speed up locale detection. + +* :meth:`~django.utils.translation.get_language_from_path` and + :meth:`~django.utils.translation.trans_real.get_supported_language_variant` + now no longer have a ``supported`` argument. + .. _deprecated-features-1.7: Features deprecated in 1.7 |
