refactor(i18n): lazy load languages (#8456)

closes AF-1397
This commit is contained in:
forehalo
2024-10-10 09:03:06 +00:00
parent f833017e45
commit 9043e6607e
60 changed files with 731 additions and 668 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import { createI18nWrapper } from './i18next';
export const useI18n = () => {
const { i18n } = useTranslation('translation');
return useMemo(() => createI18nWrapper(() => i18n), [i18n]);
};
export { I18nextProvider, Trans } from 'react-i18next';