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):
|
def get_locale(locale=None):
|
||||||
if locale:
|
if locale:
|
||||||
return locale
|
return locale
|
||||||
|
|
||||||
try:
|
try:
|
||||||
user = turbogears.identity.current.user
|
return turbogears.identity.current.user.locale
|
||||||
return turbogears.identity.user.locale or 'C'
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
return turbogears.i18n.utils._get_locale()
|
return turbogears.i18n.utils._get_locale()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue