mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-10 21:48:48 +08:00
@@ -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';
|
||||
Reference in New Issue
Block a user