You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to translate a webapp that will not have the language in the url (example: domain.com/contact will be the url of the contact page for all the languages).
This is a nextjs application, and the lingui example uses a lot router.locale to make everything works, but if I disable the nextjs i18n routing, the router.locale is no more accessible.
I tried to replace the router.locale with a function that auto-detect language, but if it is simple to make it work on server side using headers of the request, or on client side using the navigator.language, it's quite complicated to make it work in the useLinguiInit hook that is used in both the environments.
Do you have any suggestion or examples?
The text was updated successfully, but these errors were encountered:
fain182
changed the title
Example of nextjs integration without internazionalized routing
Example of nextjs integration without internationalized routing
Jul 4, 2024
I need to translate a webapp that will not have the language in the url (example: domain.com/contact will be the url of the contact page for all the languages).
This is a nextjs application, and the lingui example uses a lot router.locale to make everything works, but if I disable the nextjs i18n routing, the router.locale is no more accessible.
I tried to replace the router.locale with a function that auto-detect language, but if it is simple to make it work on server side using headers of the request, or on client side using the navigator.language, it's quite complicated to make it work in the
useLinguiInit
hook that is used in both the environments.Do you have any suggestion or examples?
The text was updated successfully, but these errors were encountered: