@wix/essentials 1.0.2 → 1.0.4
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/build/i18n/i18n.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createHostModule } from '@wix/sdk-runtime/host-modules';
|
|
2
2
|
import i18next from 'i18next';
|
|
3
3
|
import { initReactI18next } from 'react-i18next';
|
|
4
|
-
import {
|
|
4
|
+
import { listSupportedLanguages } from '@wix/multilingual-manager';
|
|
5
5
|
function getPrimaryLanguage(fallback) {
|
|
6
|
-
return (
|
|
7
|
-
|
|
6
|
+
return (listSupportedLanguages().find((language) => language.primary)?.id ??
|
|
7
|
+
fallback);
|
|
8
8
|
}
|
|
9
9
|
export const i18n = createHostModule({
|
|
10
10
|
getLanguage: (host) => () => {
|
package/cjs/build/i18n/i18n.js
CHANGED
|
@@ -7,10 +7,10 @@ exports.i18n = void 0;
|
|
|
7
7
|
const host_modules_1 = require("@wix/sdk-runtime/host-modules");
|
|
8
8
|
const i18next_1 = __importDefault(require("i18next"));
|
|
9
9
|
const react_i18next_1 = require("react-i18next");
|
|
10
|
-
const
|
|
10
|
+
const multilingual_manager_1 = require("@wix/multilingual-manager");
|
|
11
11
|
function getPrimaryLanguage(fallback) {
|
|
12
|
-
return (
|
|
13
|
-
|
|
12
|
+
return ((0, multilingual_manager_1.listSupportedLanguages)().find((language) => language.primary)?.id ??
|
|
13
|
+
fallback);
|
|
14
14
|
}
|
|
15
15
|
exports.i18n = (0, host_modules_1.createHostModule)({
|
|
16
16
|
getLanguage: (host) => () => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createHostModule } from '@wix/sdk-runtime/host-modules';
|
|
2
2
|
import i18next from 'i18next';
|
|
3
3
|
import { initReactI18next } from 'react-i18next';
|
|
4
|
-
import {
|
|
4
|
+
import { listSupportedLanguages } from '@wix/multilingual-manager';
|
|
5
5
|
function getPrimaryLanguage(fallback) {
|
|
6
|
-
return (
|
|
7
|
-
|
|
6
|
+
return (listSupportedLanguages().find((language) => language.primary)?.id ??
|
|
7
|
+
fallback);
|
|
8
8
|
}
|
|
9
9
|
export const i18n = createHostModule({
|
|
10
10
|
getLanguage: (host) => () => {
|
|
@@ -7,10 +7,10 @@ exports.i18n = void 0;
|
|
|
7
7
|
const host_modules_1 = require("@wix/sdk-runtime/host-modules");
|
|
8
8
|
const i18next_1 = __importDefault(require("i18next"));
|
|
9
9
|
const react_i18next_1 = require("react-i18next");
|
|
10
|
-
const
|
|
10
|
+
const multilingual_manager_1 = require("@wix/multilingual-manager");
|
|
11
11
|
function getPrimaryLanguage(fallback) {
|
|
12
|
-
return (
|
|
13
|
-
|
|
12
|
+
return ((0, multilingual_manager_1.listSupportedLanguages)().find((language) => language.primary)?.id ??
|
|
13
|
+
fallback);
|
|
14
14
|
}
|
|
15
15
|
exports.i18n = (0, host_modules_1.createHostModule)({
|
|
16
16
|
getLanguage: (host) => () => {
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/essentials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@wix/error-handler": "^1.67.0",
|
|
6
6
|
"@wix/monitoring": "^0.21.0",
|
|
7
|
+
"@wix/multilingual-manager": "^1.2.0",
|
|
7
8
|
"@wix/sdk-runtime": "1.0.5",
|
|
8
9
|
"@wix/sdk-types": "1.17.2",
|
|
9
|
-
"@wix/site": "^1.39.0",
|
|
10
10
|
"i18next": "^25.6.3",
|
|
11
11
|
"i18next-icu": "^2.4.1",
|
|
12
12
|
"intl-messageformat": "^10.7.18",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
]
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
|
-
"falconPackageHash": "
|
|
88
|
+
"falconPackageHash": "928d50de1ae76a59570c226c7ee17ec518a7c9444c38cca623a7ef47"
|
|
89
89
|
}
|