Closed fatih-koc closed 1 year ago
In _app
:
export default withTranslateRoutes(appWithTranslation(App, nextI18nextConfig))
In getServerSideProps
/ getStaticProps
:
return {
props: {
...await serverSideTranslations(locale, namespaces, nextI18nextConfig),
}
}
We are so frustrated as a team to find out Nextjs does not offer a complete solution to handle localized slugs and they even announced that there will be no i18n in Nextjs v13 which any complete frameworks like Django or RubyonRails even Nuxt offer for years. https://github.com/vercel/next.js/discussions/18485#discussioncomment-4348848
We had shed tear and pain migrating our content heavy website which have 7 languages and 72k content. As any reasonable developer who do not wish to lose any traffic and backlink, we wanted to keep our routes as same as possible with old sitemap.
We are using i18next to handle translations and withPlugins package to handle all modification in next.config.js yet we could not figure out how to propery adjust next-translate-routes in our config.
code
our next.config.js:
our next-i18next.config.js: