UNPKG

refunjs

Version:

Modern React-based framework for building scalable web applications with enhanced developer experience

14 lines (11 loc) 294 B
import { useTranslation } from "react-i18next"; import { changeLanguage, getCurrentLanguage } from "@/utils/changeLanguage"; export function useLanguage() { const { t } = useTranslation(); const lang = getCurrentLanguage(); return { t, lang, setLang: changeLanguage, }; }