Locale files are getting 404 , because of adding basePath ,
What i have tried i18n.tsx
const NextI18NextInstance = new NextI18Next({
defaultLanguage: 'en',
otherLanguages: ['de'],
fallbackLng: 'en',
localeSubpaths,
localePath: path.resolve('./public/static/locales'),
})
Updated above code with basePath like below ,
const NextI18NextInstance = new NextI18Next({
defaultLanguage: 'en',
otherLanguages: ['de'],
fallbackLng: 'en',
localeSubpaths,
localePath: path.resolve('./<basepath>/public/static/locales'),
})
But this is throwing internal server error.
Hi folks fixed it by this configuration in i18n.tsx Need to add backend in i18n.tsx
apiDomainName can be localhost:3000 or www.your-webiste.com