summaryrefslogtreecommitdiff
path: root/docs/api/i18n.rst
blob: d76d3638309343b332c93b066a130475ddb95b76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
.. _i18n_module:

:mod:`repoze.bfg.i18n`
----------------------

.. automodule:: repoze.bfg.i18n

  .. autofunction:: get_translator(request)

  .. function:: msg(text, domain=None, default=None, mapping=None)

     Create a :class:`repoze.bfg.i18n.TranslationString` instance in
     the ``bfg`` domain.  If this is a "technical" translation, use a
     opaque string for ``text``, and make the ``default`` the format
     string.  if this is a nontechnical translation, pass only
     ``text``.

  .. autoclass:: InterpolationOnlyTranslator

See :ref:`i18n_chapter` for more information about using
:mod:`repoze.bfg` internationalization services within an application.