mirror of
https://github.com/spacedriveapp/spacedrive
synced 2024-07-14 06:34:04 +00:00
* you know, you could just work on first try * fix extension * configure plugin and fix few translation issues * more * more keys * and more * more keys and sort * commit msg * we like keys here * end my suffering * jk i just love keys * key fix * add turkish * add german * Entendido * Demnächst * Mettre une étoile sur GitHub * 成功 * pnpm-lock * vite plugin * remove i18next backends --------- Co-authored-by: Brendan Allan <brendonovich@outlook.com>
13 lines
293 B
TypeScript
13 lines
293 B
TypeScript
import { useTranslation } from 'react-i18next';
|
|
|
|
export const useLocale = (namespace: Parameters<typeof useTranslation>[0] = 'translation') => {
|
|
const { i18n, t } = useTranslation(namespace);
|
|
const isLocaleReady = Object.keys(i18n).length > 0;
|
|
|
|
return {
|
|
i18n,
|
|
t,
|
|
isLocaleReady
|
|
};
|
|
};
|