From eb41f3286bfe37a55c64495327b8989c0b803433 Mon Sep 17 00:00:00 2001 From: Jack Allnutt Date: Sun, 7 Jul 2013 21:20:27 +0100 Subject: [PATCH] Send the Content-Language header when directly loading a translation file --- server/httphandler.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server/httphandler.js b/server/httphandler.js index 3977a04..e58a9de 100644 --- a/server/httphandler.js +++ b/server/httphandler.js @@ -40,6 +40,8 @@ HttpHandler.prototype.serve = function (request, response) { // Kiwi will just use the default en-gb strings baked in to it. if (request.url === '/assets/locales/magic.json') { return serveMagicLocale.call(this, request, response); + } else if (request.url.substr(0, 16) === '/assets/locales/') { + response.setHeader('Content-Language', request.url.substr(16, request.url.indexOf('.') - 16)); } this.file_server.serve(request, response, function (err) { -- 2.25.1