Created
January 11, 2022 10:44
-
-
Save hmelenok/d554df521ff7020e853d0426c1fdf238 to your computer and use it in GitHub Desktop.
i18n in React usage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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