()
| 57 | |
| 58 | // exported for testing |
| 59 | export function initDefaultI18nInstance() { |
| 60 | // If the resources are not an object, we need to initialize the plugin translations |
| 61 | if (getI18nInstance().options?.resources && typeof getI18nInstance().options.resources === 'object') { |
| 62 | return; |
| 63 | } |
| 64 | |
| 65 | const initPromise = getI18nInstance().use(initReactI18next).init({ |
| 66 | resources: {}, |
| 67 | returnEmptyString: false, |
| 68 | lng: DEFAULT_LANGUAGE, // this should be the locale of the phrases in our source JSX |
| 69 | }); |
| 70 | initTFuncAndTransComponent(); |
| 71 | return initPromise; |
| 72 | } |
| 73 | |
| 74 | // exported for testing |
| 75 | export function initDefaultReactI18nInstance() { |
no test coverage detected