diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt
a
|
b
|
|
449 | 449 | The ``javascript_catalog`` view |
450 | 450 | ------------------------------- |
451 | 451 | |
452 | | The main solution to these problems is the ``javascript_catalog`` view, which |
453 | | sends out a JavaScript code library with functions that mimic the ``gettext`` |
454 | | interface, plus an array of translation strings. Those translation strings are |
455 | | taken from the application, project or Django core, according to what you |
456 | | specify in either the info_dict or the URL. |
| 452 | .. module:: django.views.i18n |
| 453 | |
| 454 | .. function:: def javascript_catalog(request, domain='djangojs', packages=None) |
| 455 | |
| 456 | The main solution to these problems is the ``django.views.i18n.javascript_catalog`` |
| 457 | view, which sends out a JavaScript code library with functions that mimic the |
| 458 | ``gettext`` interface, plus an array of translation strings. Those translation |
| 459 | strings are taken from the application, project or Django core, according to what |
| 460 | you specify in either the info_dict or the URL. |
457 | 461 | |
458 | 462 | You hook it up like this:: |
459 | 463 | |
… |
… |
|
471 | 475 | those catalogs are merged into one catalog. This is useful if you have |
472 | 476 | JavaScript that uses strings from different applications. |
473 | 477 | |
| 478 | By default, the view uses the ``djangojs`` gettext domain which can be |
| 479 | changed by the ``domain`` argument. |
| 480 | |
474 | 481 | You can make the view dynamic by putting the packages into the URL pattern:: |
475 | 482 | |
476 | 483 | urlpatterns = patterns('', |
… |
… |
|
541 | 548 | The ``set_language`` redirect view |
542 | 549 | ================================== |
543 | 550 | |
| 551 | .. function:: def set_language(request) |
| 552 | |
544 | 553 | As a convenience, Django comes with a view, ``django.views.i18n.set_language``, |
545 | 554 | that sets a user's language preference and redirects back to the previous page. |
546 | 555 | |