Skip to content

Commit

Permalink
[xs] bugfix default locale not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Feb 22, 2012
1 parent 707297e commit 0fc7cc5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ckan/lib/i18n.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ def get_available_locales():

def handle_request(request, tmpl_context):
''' Set the language for the request '''
lang = request.environ.get('CKAN_LANG', config['ckan.locale_default'])
lang = request.environ.get('CKAN_LANG',
config.get('ckan.locale_default', 'en'))
if lang != 'en':
i18n.set_lang(lang)
tmpl_context.language = lang
Expand Down

0 comments on commit 0fc7cc5

Please sign in to comment.