mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-04 09:38:50 +01:00
🌍 fix: Enhance i18n Support & Optimize Category Handling (#5866)
* fix: Missing Translations in Prompt Filters in Prompt Library * fix: fixed issue with `zh` feat: added `Estonian` language option * fix: test for `i18n.ts` * refactor: `pt` --> `pt-BR` and `pt-PT` * feat: request access to another language. default is only one language during invite.
This commit is contained in:
parent
52a6de2aa7
commit
04c2a5abe7
33 changed files with 819 additions and 41 deletions
|
|
@ -1,9 +1,9 @@
|
|||
import { useEffect, useCallback } from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import { TOptions } from 'i18next';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { TOptions } from 'i18next';
|
||||
import store from '~/store';
|
||||
import { resources } from '~/locales/i18n';
|
||||
import store from '~/store';
|
||||
|
||||
export type TranslationKeys = keyof typeof resources.en.translation;
|
||||
|
||||
|
|
@ -17,10 +17,5 @@ export default function useLocalize() {
|
|||
}
|
||||
}, [lang, i18n]);
|
||||
|
||||
const memoizedLocalize = useCallback(
|
||||
(phraseKey: TranslationKeys, options?: TOptions) => t(phraseKey, options),
|
||||
[t],
|
||||
);
|
||||
|
||||
return memoizedLocalize;
|
||||
}
|
||||
return (phraseKey: TranslationKeys, options?: TOptions) => t(phraseKey, options);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue