Progress on translations (#9703)
Start adding a few translations on setting pages, introduce pseudo-locale, switch to dynamic import, add eslint rule
This commit is contained in:
7
packages/twenty-front/src/utils/i18n/dynamicActivate.ts
Normal file
7
packages/twenty-front/src/utils/i18n/dynamicActivate.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { i18n } from '@lingui/core';
|
||||
|
||||
export const dynamicActivate = async (locale: string) => {
|
||||
const { messages } = await import(`../../locales/generated/${locale}.ts`);
|
||||
i18n.load(locale, messages);
|
||||
i18n.activate(locale);
|
||||
};
|
||||
Reference in New Issue
Block a user