summaryrefslogtreecommitdiff
path: root/nova/cmd/__init__.py
diff options
context:
space:
mode:
authorMatt Odden <mrodden@us.ibm.com>2013-05-24 05:37:17 +0000
committerMatt Odden <mrodden@us.ibm.com>2013-09-03 03:12:10 +0000
commitee53124ccb707f4e5aba0b9afec67e898da42911 (patch)
tree50829ec90515ceb52733676228d499b3b30adfc8 /nova/cmd/__init__.py
parent7fa226462545951a802d73ad06000b8bb414c2f4 (diff)
downloadnova-ee53124ccb707f4e5aba0b9afec67e898da42911.tar.gz
Add support for API message localization
Using the lazy gettext functionality from oslo gettextutils, it is possible to use the Accept-Language header to translate an exception message to the user requested locale and return that translation from the API. Implements bp user-locale-api Change-Id: I446fdf4b9843155e0c818c271114b1e2e4f43b64
Diffstat (limited to 'nova/cmd/__init__.py')
-rw-r--r--nova/cmd/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/cmd/__init__.py b/nova/cmd/__init__.py
index 87edf9b4b9..a0d4dc38d9 100644
--- a/nova/cmd/__init__.py
+++ b/nova/cmd/__init__.py
@@ -32,3 +32,6 @@ os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
import eventlet
eventlet.monkey_patch(os=False)
+
+from nova.openstack.common import gettextutils
+gettextutils.enable_lazy()