Author: jezdez
Date: 2011-08-25 02:20:44 -0700 (Thu, 25 Aug 2011)
New Revision: 16685
Modified:
django/trunk/docs/ref/utils.txt
Log:
Documented `translation.override` context manager introduced in r16166.
Modified: django/trunk/docs/ref/utils.txt
===================================================================
--- django/trunk/docs/ref/utils.txt 2011-08-25 08:13:28 UTC (rev 16684)
+++ django/trunk/docs/ref/utils.txt 2011-08-25 09:20:44 UTC (rev 16685)
@@ -523,9 +523,8 @@
.. function:: activate(language)
- Fetches the translation object for a given tuple of application name and
- language and installs it as the current translation object for the current
- thread.
+ Fetches the translation object for a given language and installs it as
+ the current translation object for the current thread.
.. function:: deactivate()
@@ -538,6 +537,16 @@
useful when we want delayed translations to appear as the original string
for some reason.
+.. function:: override(language)
+
+ .. versionadded:: 1.4
+
+ A Python context manager that uses
+ :func:`django.utils.translation.activate` to fetch the translation object
+ for a given language, installing it as the translation object for the
+ current thread and deinstalls it again on exit with
+ :func:`django.utils.translation.deactivate`.
+
.. function:: get_language()
Returns the currently selected language code.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.