]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Enable localizable REST API responses via the Accept-Language header
authorLuis A. Garcia <luis@linux.vnet.ibm.com>
Tue, 30 Jul 2013 18:52:05 +0000 (18:52 +0000)
committerLuis A. Garcia <luis@linux.vnet.ibm.com>
Wed, 7 Aug 2013 21:19:25 +0000 (21:19 +0000)
commitd12fcadaa0d08b56d82d45cf2f80729fdc685f1a
treed2f860b0dde8339a7161438f279934ecca04faff
parentdc12dfb340cf440a4af4de71202ddc53b946042a
Enable localizable REST API responses via the Accept-Language header

Add support for doing language resolution for a request, based on the
Accept-Language HTTP header. Using the lazy gettext functionality, from
oslo gettextutils, it is possible to use the resolved language to
translate exception messages to the user requested language and
return that translation from the API.

Partially implements bp user-locale-api.

Change-Id: I63edc8463836bfff257daa8a2c66ed5d3a444254
neutron/api/v2/resource.py
neutron/server/__init__.py
neutron/tests/unit/test_api_v2_resource.py
neutron/wsgi.py