File size: 456 Bytes
f2e9a59 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 'use client';
import i18next from './i18next';
import { useState } from 'react';
import { useTranslation } from 'react-i18next';
import { UseTranslationOptions } from 'react-i18next/index';
export function useT(ns?: string, options?: UseTranslationOptions<any>) {
const { t } = useTranslation(ns, options);
return t;
}
export function useTranslationSettings() {
const [savedI18next, setSavedI18next] = useState(i18next);
return savedI18next;
}
|