Usage of i18nextBrowserLanguageDetector should be optional
See original GitHub issueI’ve been analyzing app bundle size and noticed that i18next-browser-languagedetector
in the client bundle (2KB gz). Some projects may not to want this language detector, so it’d be great if it could be made an opt-in (i.e. required by the app’s i18n.js
rather than in next-i18next
). See https://github.com/isaachinman/next-i18next/issues/16#issuecomment-444397728 for my example of an app that uses other language detectors.
Issue Analytics
- State:
- Created 5 years ago
- Comments:33 (33 by maintainers)
Top Results From Across the Web
Usage of i18nextBrowserLanguageDetector should be optional
I've been analyzing app bundle size and noticed that i18next-browser-languagedetector in the client bundle (2KB gz). Some projects may not to want this ......
Read more >Can I detect when a language is detected for the first time ...
I'm using i18next and i18next-browser-languageDetector to detect the browser language, and currently I have an event bound to i18next for when ...
Read more >i18next-browser-languagedetector - npm package - Snyk
language detector used in browser environment for i18next For more information about how to use this package see README. Latest version published 2...
Read more >Migration Guide - i18next documentation
i18next now automatically tries to detect natural language keys. This way there is no need to set nsSeparator or keySeparator option ...
Read more >A Guide to React Localization with i18next | Phrase
The interpolation config option is used to disable i18next's escaping of values ... Go deeper » A lot of i18next-browser-languagedetector's behaviour is ...
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 am open to breaking changes and all suggestions.
Please, keep issues limited to a SINGLE topic. If you have a new suggestion, open a new issue.
@kachkaev You have argued your point passionately, and at length.
To be clear, I’m not worried about breaking changes whatsoever at this point.
Perhaps in the future we’ll split
i18next-browser-languagedetector
out of the bundle to save 6kb, but it’s not going to happen now. For now all deps will remain in a single package.The main point is that the functionality is now optional, and people can disable browser/header detection.