not-locale 0.0.26 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -150,17 +150,18 @@ class nsLocale {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
selectBest() {
|
|
153
|
+
let defaultLocale = "ru";
|
|
153
154
|
if (navigator.languages) {
|
|
154
|
-
|
|
155
|
+
const navigatorLocale = navigator.languages.find((itm) => {
|
|
155
156
|
return this.locales.includes(itm);
|
|
156
157
|
});
|
|
157
|
-
if (
|
|
158
|
-
|
|
158
|
+
if (navigatorLocale) {
|
|
159
|
+
defaultLocale = navigatorLocale;
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
162
|
return this.app.getWorking(
|
|
162
163
|
"locale",
|
|
163
|
-
this.app.getOptions("modules.locale.default",
|
|
164
|
+
this.app.getOptions("modules.locale.default", defaultLocale)
|
|
164
165
|
);
|
|
165
166
|
}
|
|
166
167
|
}
|