Skip to content
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

Refactor i18n with next-intl 3.x #176

Merged
merged 7 commits into from
Nov 26, 2023
Merged

Conversation

heliocastro
Copy link
Contributor

  • Update base dependencies.
  • Refactor i18n code with next-intl 3.x requirements.
  • Create a dropdown for language change.

Signed-off-by: Helio Chissini de Castro <[email protected]>
Signed-off-by: Helio Chissini de Castro <[email protected]>
Quoting documentation:

Usage of next-intl APIs in Server Components currently opts into dynamic rendering.
This limitation will eventually be lifted, but as a stopgap solution, you can use the
`unstable_setRequestLocale` API to enable static rendering.

Reference:
https://next-intl-docs.vercel.app/docs/getting-started/app-router-server-components#static-rendering

Signed-off-by: Helio Chissini de Castro <[email protected]>
Dynamic values cause TypeScript eslint linter and compiler to issue
the TS-2345 error. Cause is that as resolved in runtime, the string
can't be evaluated in lint and compiler time, assuming an error, even
the code is correct.

Signed-off-by: Helio Chissini de Castro <[email protected]>
@heliocastro heliocastro self-assigned this Nov 26, 2023
@heliocastro heliocastro merged commit 585cfff into main Nov 26, 2023
2 checks passed
@heliocastro heliocastro deleted the heliocastro/update_refactor branch November 26, 2023 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant