diff options
| author | Atsushi Odagiri <aodagx@gmail.com> | 2010-11-27 15:08:31 +0900 |
|---|---|---|
| committer | Atsushi Odagiri <aodagx@gmail.com> | 2010-11-27 15:08:31 +0900 |
| commit | cd2f78c893ce6ae98004189a1a0a649fac96d033 (patch) | |
| tree | 5ab84f72e6bf0476d7d40841f3341aaf9a4e54a4 /docs/narr/i18n.rst | |
| parent | ba32a8d0dcee7f3cef231e08ed60d52fbf60ed4f (diff) | |
| parent | 4d76ed6f46304d43a6b95da7a4d5388527bf6c1e (diff) | |
| download | pyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.tar.gz pyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.tar.bz2 pyramid-cd2f78c893ce6ae98004189a1a0a649fac96d033.zip | |
Merge remote branch 'remotes/upstream/master'
Diffstat (limited to 'docs/narr/i18n.rst')
| -rw-r--r-- | docs/narr/i18n.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 703883fb2..9e2071872 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -773,8 +773,8 @@ If this setting is supplied within the :app:`Pyramid` application .. code-block:: python :linenos: - from pyramid.setttings import get_settings - settings = get_settings() + from pyramid.threadlocal import get_current_registry + settings = get_current_registry().settings default_locale_name = settings['default_locale_name'] "Detecting" Available Languages @@ -822,8 +822,9 @@ Then as a part of the code of a custom :term:`locale negotiator`: .. code-block:: py - from pyramid.settings import get_settings - languages = get_settings()['available_languages'].split() + from pyramid.threadlocal import get_current_registry + settings = get_current_registry().settings + languages = settings['available_languages'].split() This is only a suggestion. You can create your own "available languages" configuration scheme as necessary. |
