Comments (7)
Thanks for resolving, the issue. I experimented with server context on my side also, but setting headers is a better solutions. Thanks 👍
from next-international.
Hey, what's the error you're getting?
from next-international.
Sorry, i get the following Error: No locale set, make sure to use the I18nProviderServer component
https://github.com/titouv/next-international-repro-bug
Here is the link to the repro, the root path is failing with the previous errors but the root with async wrapper and the root with the non async wrapper works perfectly. Maybe there is something I don't understand about NextJS behavior
from next-international.
With further testing it appears the error also appears when navigating to a page, a simple reload removes the issue but the navigation make this error happen even though its wrapped
from next-international.
Seems in the repro and in the example from the repo (at least on my side), the getLocale function is run before the setLocale, which is thus problematic. If this can give an hint
from next-international.
Looks like cache
isn't the ideal solution to save the current locale for a given session. I'll try to use server contexts instead.
from next-international.
I've published 0.5.2 which resolves the issue on my side. Could you try again and open another issue if needed? Thanks.
from next-international.
Related Issues (20)
- [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 HOT 1
- static site routing (ssg) HOT 2
- Feedback for “Middleware configuration”
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.