The useT hook
Translate any string in your component with the useT hook
const MyComponent = () => {
const t = useT()
return (
<button aria-label={t('Main Menu)}>
<HamburgerIcon />
</button>
)
}<const MyComponent = () => {
const t = useT()
return (
<p>{t('This will be translated')}</p>
)
}t() function options
Last updated