blob: 59dcf32c2990a480cb541299bef4921949b8f3c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
.. _localenegotiator_directive:
``localenegotiator``
--------------------
Set the :term:`locale negotiator` for the current configurator to
support localization of text.
.. note: This ZCML directive is new as of :mod:`repoze.bfg` version 1.3.
Attributes
~~~~~~~~~~
``negotiator``
The :term:`dotted Python name` to a :term:`locale negotiator`
implementation. This attribute is required. If it begins with a
dot (``.``), the name will be considered relative to the directory
in which the ZCML file which contains this directive lives.
Example
~~~~~~~
.. code-block:: xml
:linenos:
<localenegotiator
negotiator="some.package.module.my_locale_negotiator"
/>
Alternatives
~~~~~~~~~~~~
Use :meth:`repoze.bfg.configuration.Configurator.set_locale_negotiator`
method instance during initial application setup.
See Also
~~~~~~~~
See also :ref:`activating_translation`.
|