I have a Footer component:
export default function Footer() {
const { t } = useTranslation("layout-footer");
const currentYear = new Date().getFullYear();
return (
<footer className='py-6 mt-20 border-t-[1px] border-opacity-50'>
<p className='text-sm text-center mb-6'>{t("addresses")}</p>
<p className='text-sm text-center mb-6'>
<Trans
i18nKey='information'
t={t}
components={{
currentYear,
link: (
<Link
href='https://www.signinsolutions.com'
className='text-green-600'
rel='noreferrer'
target='_blank'
>
Sign In Solutions
</Link>
),
}}
/>
</p>
</footer>
);
}
json file:
{
"information": "© {{currentYear}} Sign In App Ltd is part of the {{link}} suite of brands providing global, cloud-based solutions to manage visitors, employees, workplaces and beyond."
}
I tried multiple different things without success - I just can't get seem to get that currentYear and Link component rendered in my translation at the same time - Link will always be as [Object object]