@andre1502/react-utilities 0.9.5 → 0.9.6

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/dist/i18n.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var EnvironmentEnum = require('./EnvironmentEnum-BjXsfSRZ.js');
4
- var I18n = require('./I18n-qeRA3rLa.js');
4
+ var I18n = require('./I18n-zYe_O_Pr.js');
5
5
  require('cross-fetch');
6
6
 
7
7
 
package/dist/i18n.mjs CHANGED
@@ -1,4 +1,4 @@
1
1
  export { E as EnvironmentEnum } from './EnvironmentEnum-UcQ6Il1O.js';
2
- export { g as getV, i as initI18n } from './I18n-DDRri5uR.js';
2
+ export { g as getV, i as initI18n } from './I18n-DmYkVPZM.js';
3
3
  import 'cross-fetch';
4
4
  //# sourceMappingURL=i18n.mjs.map
package/dist/index-rn.cjs CHANGED
@@ -29,7 +29,7 @@ require('@formatjs/intl-datetimeformat/locale-data/zh');
29
29
  require('@formatjs/intl-datetimeformat/polyfill');
30
30
  require('@formatjs/intl-datetimeformat/add-golden-tz.js');
31
31
  var EnvironmentEnum = require('./EnvironmentEnum-BjXsfSRZ.js');
32
- var I18n = require('./I18n-qeRA3rLa.js');
32
+ var I18n = require('./I18n-zYe_O_Pr.js');
33
33
  var ReactNative = require('./ReactNative-CqUrY2ZJ.js');
34
34
  require('@formatjs/intl-numberformat');
35
35
  require('cross-fetch');
package/dist/index-rn.mjs CHANGED
@@ -27,7 +27,7 @@ import '@formatjs/intl-datetimeformat/locale-data/zh';
27
27
  import '@formatjs/intl-datetimeformat/polyfill';
28
28
  import '@formatjs/intl-datetimeformat/add-golden-tz.js';
29
29
  export { E as EnvironmentEnum } from './EnvironmentEnum-UcQ6Il1O.js';
30
- export { g as getV, i as initI18n } from './I18n-DDRri5uR.js';
30
+ export { g as getV, i as initI18n } from './I18n-DmYkVPZM.js';
31
31
  export { i as initSentry, r as recordAdditionalSentryHttp } from './ReactNative-mNnws-b5.js';
32
32
  import '@formatjs/intl-numberformat';
33
33
  import 'cross-fetch';
package/dist/index.cjs CHANGED
@@ -29,7 +29,7 @@ require('@formatjs/intl-datetimeformat/locale-data/zh');
29
29
  require('@formatjs/intl-datetimeformat/polyfill');
30
30
  require('@formatjs/intl-datetimeformat/add-golden-tz.js');
31
31
  var EnvironmentEnum = require('./EnvironmentEnum-BjXsfSRZ.js');
32
- var I18n = require('./I18n-qeRA3rLa.js');
32
+ var I18n = require('./I18n-zYe_O_Pr.js');
33
33
  var React = require('./React-qUl0CBmE.js');
34
34
  require('@formatjs/intl-numberformat');
35
35
  require('cross-fetch');
package/dist/index.mjs CHANGED
@@ -27,7 +27,7 @@ import '@formatjs/intl-datetimeformat/locale-data/zh';
27
27
  import '@formatjs/intl-datetimeformat/polyfill';
28
28
  import '@formatjs/intl-datetimeformat/add-golden-tz.js';
29
29
  export { E as EnvironmentEnum } from './EnvironmentEnum-UcQ6Il1O.js';
30
- export { g as getV, i as initI18n } from './I18n-DDRri5uR.js';
30
+ export { g as getV, i as initI18n } from './I18n-DmYkVPZM.js';
31
31
  export { i as initSentry, r as recordAdditionalSentryHttp } from './React-BaJ1KfGF.js';
32
32
  import '@formatjs/intl-numberformat';
33
33
  import 'cross-fetch';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andre1502/react-utilities",
3
- "version": "0.9.5",
3
+ "version": "0.9.6",
4
4
  "description": "module to combine common functions",
5
5
  "repository": {
6
6
  "type": "git",
package/src/I18n/I18n.ts CHANGED
@@ -119,8 +119,13 @@ const initI18n = ({
119
119
  }
120
120
 
121
121
  if (!i18next.isInitialized) {
122
- i18next
123
- .use(ChainedBackend)
122
+ let i18n = i18next;
123
+
124
+ if (useBackend) {
125
+ i18n = i18n.use(ChainedBackend);
126
+ }
127
+
128
+ i18n
124
129
  .use(languageDetector)
125
130
  .use(initReactI18next) // passes i18n down to react-i18next
126
131
  .init(config, (ex, t) => {