Server Next.js automatically redirect to english despite browser has another language http://localhost:3000/en instead http://localhost:3000.
My next-i18next.config
module.exports = {
i18n: {
locales: ['ua', 'en', 'ru', 'ar'],
defaultLocale: 'ua',
}
}
Ukrainian and English are installed in the browser. Ukrainian in the beginning.
Accept-Language
in request headers: uk,en;q=0.9
How to make it not redirected to English? What am I doing wrong? My package.json
{
"name": "connect-prerelease",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next",
"build": "next build",
"start": "next start -p $PORT"
},
"dependencies": {
"@parse/react-ssr": "0.0.1-alpha.14",
"@types/parse": "^2.18.6",
"bootstrap": "^4.6.0",
"next": "10.2.3",
"next-i18next": "^8.5.0",
"next-images": "^1.8.1",
"parse": "^3.2.0",
"react": "17.0.2",
"react-bootstrap": "^1.6.1",
"react-dom": "17.0.2"
},
"devDependencies": {
"@types/react": "17.0.11",
"next-compose": "0.0.2",
"typescript": "4.3.2"
}
}