Mumutii
Mumutii
CDCloudflare Developers
Created by Mumutii on 6/25/2023 in #pages-help
Trouble with script loading
11 replies
CDCloudflare Developers
Created by Mumutii on 6/22/2023 in #pages-help
No language detection on the custom domain
Hello, 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 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?
1 replies
CDCloudflare Developers
Created by Mumutii on 6/14/2023 in #pages-help
Next.js 13 + next translation to Cloudflare Pages
Hello, I see that a fix has been released but I still can't use next translate with the edge. My problem is : - The path / does not work (404) - The /en path works - The /fr path does not work (404) - The /nl patch does not work (404) Next config :
const nextTranslate = require('next-translate-plugin')

const nextConfig = {
experimental: {
runtime: 'experimental-edge',
},
swcMinify: true,
reactStrictMode: true,
}

module.exports = {
...nextTranslate(),
...nextConfig,
}
const nextTranslate = require('next-translate-plugin')

const nextConfig = {
experimental: {
runtime: 'experimental-edge',
},
swcMinify: true,
reactStrictMode: true,
}

module.exports = {
...nextTranslate(),
...nextConfig,
}
i18n.js config :
module.exports = {
locales: ['en', 'fr', 'nl'],
defaultLocale: 'en',
pages: {
'/': ['home'],
},
loadLocaleFrom: (lang, ns) => {
const translation = lang.slice(0, 2);

return import(`./locales/${translation}/${ns}.json`).then(
(m) => m.default,
);
},
};
module.exports = {
locales: ['en', 'fr', 'nl'],
defaultLocale: 'en',
pages: {
'/': ['home'],
},
loadLocaleFrom: (lang, ns) => {
const translation = lang.slice(0, 2);

return import(`./locales/${translation}/${ns}.json`).then(
(m) => m.default,
);
},
};
Version NextJS version : 13.4.5 Test also on next 13.2.0 Next-on-pages : 1.0.2 I've tried several configurations but my brain has run out of ideas. If you have an idea or a concrete example with next translate?
2 replies