Skip to content

Instantly share code, notes, and snippets.

@hmelenok
Created January 11, 2022 10:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hmelenok/d554df521ff7020e853d0426c1fdf238 to your computer and use it in GitHub Desktop.
Save hmelenok/d554df521ff7020e853d0426c1fdf238 to your computer and use it in GitHub Desktop.
i18n in React usage
import {useTranslation} from 'react-i18next';
const Index: FC = () => {
const {t} = useTranslation();
return (
<MainLayout pageTitle={t(`app-1.common.pageTitle`)}>
{t(`app-1.common.pageTitle`)}
</MainLayout>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment