Fix get_locale.
This commit is contained in:
parent
d11f614817
commit
f5719e7d41
1 changed files with 2 additions and 2 deletions
|
@ -29,9 +29,9 @@ turbogears.view.variable_providers.append(add_custom_stdvars)
|
|||
def get_locale(locale=None):
|
||||
if locale:
|
||||
return locale
|
||||
|
||||
try:
|
||||
user = turbogears.identity.current.user
|
||||
return turbogears.identity.user.locale or 'C'
|
||||
return turbogears.identity.current.user.locale
|
||||
except AttributeError:
|
||||
return turbogears.i18n.utils._get_locale()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue