@rfellows some lines heigher:
var original_browserLang = $.i18n.browserLang;
if(settings.language === null || settings.language == '') {
   settings.language = original_browserLang();
}