projects
/
KiwiIRC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be7c28f
)
Send the Content-Language header when directly loading a translation file
author
Jack Allnutt
<jack@allnutt.eu>
Sun, 7 Jul 2013 20:20:27 +0000
(21:20 +0100)
committer
Jack Allnutt
<jack@allnutt.eu>
Sun, 7 Jul 2013 20:20:27 +0000
(21:20 +0100)
server/httphandler.js
patch
|
blob
|
blame
|
history
diff --git
a/server/httphandler.js
b/server/httphandler.js
index 3977a0433dfc0be3cde47db95b0e8df2be1f4f4e..e58a9deaa8ff4ee2e6a55bf9f20b4a63f8856769 100644
(file)
--- 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) {