Didn't work with defaultLanguage different than en?
See original GitHub issueserver.js
app.prepare().then(() => {
const server = express();
if (!dev) {
server.use(compression({threshold: 0}));
}
nextI18NextMiddleware(app, server);
...
i18n.js
module.exports = new NextI18Next({
defaultLanguage: 'mn',
otherLanguages: ['en'],
});
My App starts with en not mn
Issue Analytics
- State:
- Created 5 years ago
- Comments:24 (18 by maintainers)
Top Results From Across the Web
Windows 10 language not changing completely
Press Windows key+i to open the Settings. Click Time & language. Click Region & language. Under Languages, click Add a language.
Read more >Didn't work with defaultLanguage different than en? · Issue #27
On client, just read from cookie the lang or set to default locale.
Read more >How to change system language on Windows 10
Change system region settings · Open Settings. · Click on Time & Language. · Click on Region. · Under the "Region" section, select...
Read more >Change your language on the web - Computer - Google Support
Sign in to your Google Account. On the left, click Personal info. Under "General preferences for the web," click Language and then Edit...
Read more >How to Change the System language across your ... - YouTube
You don't have to be stuck with the default Windows 10 language.If you prefer to use a different language, you can change it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I was able to resolve this issue by removing ‘header’ from detectors by adding the following to my config to override the default detectors:
so the set up would be:
the header detector check the request headers for
accept-language
which isen
in most casesHello everyone. but I had this problem and when I changed my default language to something like “fa” in the config, nothing happened and the “en” json file was loaded. I didn’t have any custom server like server.js and after some search and playing with NextI18Next configs, set serverLanguageDetection option to false and everything worked properly.
new NextI18Next({ defaultLanguage: 'fa', otherLanguages: ['en'], defaultNS: 'agro', localePath: path.resolve('./public/locales'), debug: true, browserLanguageDetection: true, serverLanguageDetection: false, });