-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[examples, react-intl] Application cannot be deployed using serverless target (Vercel, Netlify) #16752
Comments
Just so I understand what you're trying to achieve: You want locale detection w/o custom server or are you ok w/ doing it purely client side (no SSR). Locale negotiation can be achieved with several means:
|
I'd prefer the first option. That way you could use localization using I think In my current case the default locale is the same as the primary market, If we cannot make this work nicely without the custom server, we would have to make the client-side negotiation smoother. That might be unrelated to the Next.js example though. As far as the negotiation itself is concerned, sticking to |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
The current version of the
react-intl
example was simplified by @longlho in #16215 but it keeps the usage of a custom serverDescribe the bug
The custom server prevents usage of the serverless build target, which also prevents it from using it with Vercel.
I'm currently running a version of the previous example without the custom server by moving all the detection logic client-side.
This works but sacrifices UX by reloading languages and rerendering when loading a page.
I would prefer to find a solution using
react-intl
as I find it's API to be better than what next/react-i18next offer.To Reproduce
not applicable
Expected behavior
Ideally we reach a similar solution to
next-i18next
which makes this possible across all targets supported by Next.jsScreenshots
not applicable
System information
Additional context
I'm currently researching solutions to this problem for a project that might move to blitz-js, and found this to be an open issue there, blitz-js/blitz#279
The text was updated successfully, but these errors were encountered: