mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 02:10:15 +01:00
9 lines
310 B
TypeScript
9 lines
310 B
TypeScript
|
|
import { useRecoilValue } from 'recoil';
|
||
|
|
import { localize } from '~/localization/Translation';
|
||
|
|
import store from '~/store';
|
||
|
|
|
||
|
|
export default function useLocalize() {
|
||
|
|
const lang = useRecoilValue(store.lang);
|
||
|
|
return (phraseKey: string, ...values: string[]) => localize(lang, phraseKey, ...(values ?? []));
|
||
|
|
}
|