i18next-express-middleware
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -79,3 +79,3 @@ 'use strict'; | ||
// load resources | ||
i18next.services.backendConnector.load([req.lng], i18next.options.ns, function () { | ||
i18next.loadLanguages(req.lng, i18next.options.ns, function () { | ||
next(); | ||
@@ -82,0 +82,0 @@ }); |
@@ -57,2 +57,3 @@ 'use strict'; | ||
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var allOptions = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
@@ -64,3 +65,3 @@ _classCallCheck(this, LanguageDetector); | ||
this.init(services, options); | ||
this.init(services, options, allOptions); | ||
} | ||
@@ -72,5 +73,7 @@ | ||
var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; | ||
var allOptions = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; | ||
this.services = services; | ||
this.options = utils.defaults(options, this.options || {}, getDefaults()); | ||
this.allOptions = allOptions; | ||
@@ -112,3 +115,3 @@ this.addDetector(_languageLookupsCookie2['default']); | ||
return found || this.options.fallbackLng[0]; | ||
return found || this.allOptions.fallbackLng && this.allOptions.fallbackLng[0]; | ||
} | ||
@@ -115,0 +118,0 @@ }, { |
{ | ||
"name": "i18next-express-middleware", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "express middleware for i18next", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17825
388