From: Darren Date: Thu, 8 May 2014 09:49:03 +0000 (+0100) Subject: Default locale if one couldn't be negotiated X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e539b24c84b4a4a18d20e77fa7c4fcbefbfefeac;p=KiwiIRC.git Default locale if one couldn't be negotiated --- diff --git a/server/httphandler.js b/server/httphandler.js index 1fdcf95..f491dde 100644 --- a/server/httphandler.js +++ b/server/httphandler.js @@ -93,6 +93,9 @@ var serveMagicLocale = function (request, response) { } else { negotiator = new Negotiator(request); found_locale = negotiator.language(cached_available_locales); + + // If a locale couldn't be negotiated, use the default + found_locale = found_locale || default_locale_id; } // Send a locale to the browser