From 0284cbdc978e0fd63474b9d97307677edefe8915 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Wed, 28 Apr 2010 08:40:19 +0000 Subject: --- docs/narr/i18n.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'docs') diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 1a72ca95b..0e1d99b9e 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -602,17 +602,17 @@ You can obtain the locale name related to a request by using the locale_name = get_locale_name(request) This returns the locale name negotiated by the currently active -:term:`locale negotiator` or the :term:`default locale name` (usually -``en``) if the locale negotiator returns ``None``. You can change the -default locale name by changing the ``default_locale_name`` setting; -see :ref:`default_locale_name_setting`. - -Once :func:`repoze.bfg.i18n.get_locale_name` has run once, the local -name is stored on the request object it is passed. Subsequent calls -to :func:`repoze.bfg.i18n.get_locale_name` will return the stored -locale name without invoking the :term:`locale negotiator`. To -avoid this caching, you can use the -:func:`repoze.bfg.i18n.negotiate_locale_name` function: +:term:`locale negotiator` or the :term:`default locale name` if the +locale negotiator returns ``None``. You can change the default locale +name by changing the ``default_locale_name`` setting; see +:ref:`default_locale_name_setting`. + +Once :func:`repoze.bfg.i18n.get_locale_name` has run once, the locale +name is stored on the request object. Subsequent calls to +:func:`repoze.bfg.i18n.get_locale_name` will return the stored locale +name without invoking the :term:`locale negotiator`. To avoid this +caching, you can use the :func:`repoze.bfg.i18n.negotiate_locale_name` +function: .. code-block:: python :linenos: -- cgit v1.2.3