summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRamiro Morales <cramm0@gmail.com>2011-02-07 19:50:07 +0000
committerRamiro Morales <cramm0@gmail.com>2011-02-07 19:50:07 +0000
commit1406265e17d9e64cbe82951223689d07af43fc42 (patch)
treeaba67041de7999a7f245e8319abebbc89cd2b89b /docs
parent5f0ed3e1987de5abe654f8b90b6179381eb94195 (diff)
[1.2.X] Tweaked language markers in i18n topic document for better Sphinx syntax highlighting.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15442 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/i18n/internationalization.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt
index 771a36b3e0..4804a75266 100644
--- a/docs/topics/i18n/internationalization.txt
+++ b/docs/topics/i18n/internationalization.txt
@@ -291,8 +291,6 @@ translation method!
Working with lazy translation objects
-------------------------------------
-.. highlightlang:: python
-
Using ``ugettext_lazy()`` and ``ungettext_lazy()`` to mark strings in models
and utility functions is a common operation. When you're working with these
objects elsewhere in your code, you should ensure that you don't accidentally
@@ -507,6 +505,8 @@ string, so they don't need to be aware of translations.
Specifying translation strings: In JavaScript code
==================================================
+.. highlightlang:: python
+
Adding translations to JavaScript poses some problems:
* JavaScript code doesn't have access to a ``gettext`` implementation.
@@ -568,7 +568,11 @@ catalog file. As a security measure, these values can only be either
Using the JavaScript translation catalog
----------------------------------------
-To use the catalog, just pull in the dynamically generated script like this::
+.. highlightlang:: javascript
+
+To use the catalog, just pull in the dynamically generated script like this:
+
+.. code-block:: html+django
<script type="text/javascript" src="{% url django.views.i18n.javascript_catalog %}"></script>
@@ -623,6 +627,8 @@ to produce proper pluralizations).
The ``set_language`` redirect view
==================================
+.. highlightlang:: python
+
.. function:: set_language(request)
As a convenience, Django comes with a view, :meth:`django.views.i18n.set_language`,