From c5378a474db3b40eab85be719e0c73f6696d58c6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 25 Apr 2010 13:10:07 +0000 Subject: Default locale name. --- docs/narr/environment.rst | 2 ++ docs/narr/i18n.rst | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/narr/environment.rst b/docs/narr/environment.rst index a9bcbf70a..ab789eb86 100644 --- a/docs/narr/environment.rst +++ b/docs/narr/environment.rst @@ -122,6 +122,8 @@ Turns on all ``reload*`` settings. | | | +---------------------------------+-----------------------------+ +.. _default_locale_name_setting: + Default Locale Name -------------------- diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 577551656..a44c39d6a 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -479,8 +479,10 @@ 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 default locale name (usually -``en``) if no locale negotiator is configured. +:term:`locale negotiator` or the default locale name (usually ``en``) +if no locale negotiator is configured. 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 -- cgit v1.2.3