I use dayjs, and I want to change the locale with the current languages of i18next.language
but its not working, I get only the english format.
...
import dayjs from 'dayjs';
const { t, i18n } = useTranslation();
dayjs.locale(i18n.language);
...
You should also import the required locale. It won't work unless:
import dayjs from 'dayjs';
import('dayjs/locale/en') // path must match with `i18n.language`
const { t, i18n } = useTranslation();
dayjs.locale(i18n.language);