Creating multi language application
I would like to create an app that has english as the main language, but I want the user if he speaks Spanish to be able to switch through some button to a Spanish language version and go instead of / to /es and that to carry over to ever page.
The question that I have is whenever I need to create a new directory in both components and in the /pages folder with /es route or what is the best way to go about it? Maybe there is already some tutorials and use cases on github of nextjs with multi language support? That would greatly help to understand how to deal with it.
6 Replies
look up
next-i18next
Thanks! That should work hopefully
I have a question regarding mjs extension for next config that we are using in ct3
https://github.com/i18next/next-i18next/issues/1505
This is the issue and I can not find a work around except creating 2 different additional conifg files .js i18next config and then a .msj i18next config to export it to our next config .mjs
GitHub
Add support for ES module syntax in
next-i18next.config.js
· Issu...Is your feature request related to a problem? Please describe. Next.js 12 supports ES module syntax for the next.config file if the file extension is .mjs. Creating next-i18next.config.mjs doesn...
I have tried using everything else but this seems to be the biggest bottleneck
I got it working with the set up as I said above, there shouldn't be an issue, but it seems... crutch like
@simvolick Can you show your setup? I'm running into the same issue.
https://next-intl-docs.vercel.app/ is a good alternative as well.
next-intl – Internationalization (i18n) for Next.js
Internationalization (i18n) for Next.js that gets out of your way.