feat: first shoot on translation

This commit is contained in:
Julien Froidefond
2025-02-27 11:31:39 +01:00
parent 3c46afb294
commit f39e4779cf
15 changed files with 635 additions and 143 deletions

16
src/hooks/useTranslate.ts Normal file
View File

@@ -0,0 +1,16 @@
import { useTranslation } from "react-i18next";
export function useTranslate() {
const { t, i18n } = useTranslation("common");
const changeLanguage = (lang: string) => {
i18n.changeLanguage(lang);
};
return {
t,
i18n,
changeLanguage,
currentLanguage: i18n.language,
};
}