You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import { useTranslation } from 'react-i18next';
const { t } = useTranslation();
<h1 className='intro__title'>{t('intro-title')}</h1>
on rsbuild it doesnt work in dev serv, and i think in production mode it also will not work.
And more, now in console i cacth an error "react-i18next:: You will need to pass in an i18next instance by using initReactI18next".
But I it was working without this error on CRA.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Try to migrate from CRA to rsbuild. In my project on CRA I have i18n functionality, simply. It works with this config:
And i have this structure of "public" folder of project (just add "locales" folder to default file structure of "public" folder):
And im my components i use
Beta Was this translation helpful? Give feedback.
All reactions