- Next.js 13 App with Pages Directory with next-i18next suddenly started to not translate properly, but only on ISR/SSR pages — SSG worked as expected, which meant problem happens on Functions/Lambda side. This problem occurred with code that was working for a year, so it was probably infrastructure specific. The issue was present both on Vercel and AWS Amplify
- After enabling debugging in next-i18next config, it seemed that it can’t load the files. There was info about missing keys, and the
"loadPath": "./public/locales/{{lng}}/{{ns}}.json"
seemed to be only appropriate for website.
- Using path.resolve fixed the problem, and changed the loadPath.
thanks artur for fixing that! ❤️