cern-next
cern-next copied to clipboard
Unable to export your project to host
I am unable to export your app using next export command, it give error i18n support is not compatible with next export.
.
How to export the build and host it ?
Error and package.json snapshot is attached
This may help? https://dev.to/adrai/static-html-export-with-i18n-compatibility-in-nextjs-8cd
Hi @adrai. I have a question. Is there any downside of this approach where he stores all the translation as javascript string, also there's no use of getStaticProps
to get the locale. He uses useRouter
to get the locale. As I have seen that many libraries prefer to store the translation in JSON files and to get the locale they usually implement it in getStaticProps
which going to be hard to implement in terms of dynamic routes because we need to list all dynamic paths in getStaticPaths
.
This approach is kust not using any i18n framework at all. It works for simple stuff... no pluralization, no context, no interpolation, etc...
This is a whole new level of scam spam 🤯