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
Where to introduce the next component in the configuration item, and where to import the translation file 'Next-i18next' referenced by the component
#3151
Thank you very much for your reply and providing examples. However, what I want to say is that the project has already used Next-i18next as an internationalization plugin. For example, I have a navbar component that uses the translation capabilities provided by Next-i18next. However, I want to use the same component in Nextra, but obviously it is not possible now because the next page router needs to import translation files in getServerSideProps, which cannot be used in mdx in Nextra
for example
import { useTranslation } from 'next-i18next';
function Navbar () {
const { t } = useTranslation('home');
return <div>{t('hello')}</div>
}
export default Navbar
How to handle the translation files in Next-i18next when importing custom components into Navvar and Sidebar in page router?
The text was updated successfully, but these errors were encountered: