mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[enh] Retrieve and set locale in the api
This commit is contained in:
parent
acc7000977
commit
c32ecf2942
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue