[enh] Retrieve and set locale in the api

This commit is contained in:
Jérôme Lebleu 2014-05-16 19:59:06 +02:00
parent acc7000977
commit c32ecf2942

View file

@ -162,6 +162,12 @@ class _ActionsMapPlugin(object):
context -- An instance of Route
"""
try:
# Attempt to retrieve and set locale
m18n.set_locale(request.params.pop('locale'))
except:
pass
def wrapper(*args, **kwargs):
# Bring arguments together
params = kwargs