Comments (8)
in addition to having support for detect language maybe?
and thank you for the awesome lib, so far everything else has been working flawlessly in server components + client components,
without having to drill props nor complicated setup
from next-international.
Thanks for the kind words! I'll take a look at this issue.
from next-international.
The default locale serves as a fallback if no locale matches the Accept-Language
header. Your browser might be configured to use English as the default locale, so next-international tries as much as possible to use the user's locale.
from next-international.
Wouldn't make more since if we can pass an argument ( which I thought the second param in the middleware is for ) to force default language? if its none existing we can use accept-language in this case
from next-international.
I don't think it's a good idea to force a specific language if users specifically set their preferred language. This goes against what the user expects.
I'm curious about what the community thinks about this. Feel free to add reactions if you agree/disagree to see what we should do in the future.
from next-international.
Well this is exactly why its only for default because some systems may focus on having a specific default language.
in case the user preferred language isn't supported how would it behave though? would it choose the default passed as default locale?
from next-international.
in case the user preferred language isn't supported how would it behave though? would it choose the default passed as default locale?
Yes, if the preferred language isn't configured in your app, it will use configured one (2nd argument)
from next-international.
Perfect
Thank you ao much๐๐๐
from next-international.
Related Issues (20)
- is there ignoreRoutes property for ignore adding localization route to static file HOT 1
- Feedback for โSetupโ HOT 1
- [Question][Maybe due to the middleware] Forced `canonical` on OpenGraph? HOT 1
- Display Loading Indicator During Language Translation Process HOT 1
- Unit testing with createI18nServer in server-side components throws server-only error HOT 1
- Automatically localize from middleware HOT 1
- Feedback for โGet Startedโ HOT 2
- Can't set an empty string as translation value for a key
- Bailout to client side rendering HOT 1
- setStaticParamsLocale in root layout.tsx
- Migration to App router | Documentation
- How to customize the locale prefix to something else while keep using browser language auto-detection?
- Error: Could not find locale while pre-rendering page, make sure you called `setStaticParamsLocale` at the top of your pages HOT 2
- dynamic arrray map
- Check not used messages?
- I18nProviderClient block when disable Javascript in browser
- Broken Hot Reload and massive hydration errors HOT 2
- getCurrentLocale() function returns two locales HOT 1
- Typescript issue when 2 arguments on "t" function with JSON files
- Retrieve Translations (`t`) for Given Locale
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next-international.