diff options
| author | Chris McDonough <chrism@plope.com> | 2014-09-10 01:31:37 -0400 |
|---|---|---|
| committer | Chris McDonough <chrism@plope.com> | 2014-09-10 01:31:37 -0400 |
| commit | 7e9c54ed645db97049a0848eececad3437624163 (patch) | |
| tree | d1fa4bad6a63d239db0c98d6e95bd73ac5853f2d /docs | |
| parent | 3587a53dc28b8f6411816ccd7fd8fdee0d88acb4 (diff) | |
| parent | befc1b81d7713d5dab130388c285e83d641f7190 (diff) | |
| download | pyramid-7e9c54ed645db97049a0848eececad3437624163.tar.gz pyramid-7e9c54ed645db97049a0848eececad3437624163.tar.bz2 pyramid-7e9c54ed645db97049a0848eececad3437624163.zip | |
Merge branch 'master' of github.com:Pylons/pyramid
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/narr/i18n.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/narr/i18n.rst b/docs/narr/i18n.rst index 95f663584..3313f8dad 100644 --- a/docs/narr/i18n.rst +++ b/docs/narr/i18n.rst @@ -792,9 +792,11 @@ Then as a part of the code of a custom :term:`locale negotiator`: .. code-block:: python :linenos: - from pyramid.threadlocal import get_current_registry - settings = get_current_registry().settings - languages = settings['available_languages'].split() + from pyramid.settings import aslist + + def my_locale_negotiator(request): + languages = aslist(request.registry.settings['available_languages']) + # ... This is only a suggestion. You can create your own "available languages" configuration scheme as necessary. |
