Browse files

[1.2.X] Tweaked language markers in i18n topic document for better Sp…

…hinx syntax highlighting.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
ramiro committed Feb 7, 2011
1 parent 5f0ed3e commit 1406265e17d9e64cbe82951223689d07af43fc42
Showing with 9 additions and 3 deletions.
  1. +9 −3 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`,

0 comments on commit 1406265

Please sign in to comment.