What i18n libraries work with next-on-pages?
Our company's project is using Next.js and we want to migrate this to the edge using next-on-pages. At the moment we use next-i18next package for the translations, but it seems to be incompatible with the next-on-pages environment requirements. What are our options here for i18n?
11 Replies
You could try out
next-translate
perhaps. It's been a little while since I last tested it, but we have a test app that uses it and it seemed to work fineNext intl feels good as well
Warning: there are problems with the app dir and middleware in the latest versions of next
I also have a problem with a custom domain. It doesn't detect the language correctly all the time
Could you elaborate on what you mean/what's happening when you say it doesn't detect the language correctly all the time?
Can I ping you on another theads on the discord?
Sure
Yo back,
Sorry, I saw that I never got an answer regarding the problem, so I think it's better to put the problem back here which deals with the same subject.
--
Original post
In the .dev sub-domain, language detection works and it automatically redirects to the correct path (fr/nl, etc.). However, if I'm on the custom domain, language detection doesn't work.
I have also noticed one thing:
Normally some data is automatically fetched from the index. On the .dev domain, it fetches correctly but on the custom domain, it doesn't fetch either (even in the default language which is English).
infos :
NextJS 13.4.6
Next-translate 2.0.6 (i try update today to 2.4.4)
using Edge
I should point out that another project works correctly with the same configuration. The only difference on the site that isn't working properly is that it's a Cloudflare Pro site.
Do you have any ideas?
Does the other project work correctly with a custom domain?
Yepa. But in the other project I'm having problems with loading script. There's a threat in progress (very very strange problem, I'm pinging you too).
I have just tried on the custom domain you sent in the other thread and the automatic language redirection works fine for me.
I assume that's the other one you meant worked fine?
Could you DM me the domain where it doesn't work please
yes this is working fine. yes i drop you prob domain on dm