QuiiBz / next-international

Type-safe internationalization (i18n) for Next.js
https://next-international.vercel.app
MIT License
1.28k stars 59 forks source link

bug: Not changing the already loaded translations #351

Closed FleetAdmiralJakob closed 7 months ago

FleetAdmiralJakob commented 7 months ago

Describe the bug When using useChangeLocal() and call this on an onClick listener than the already loaded translations are not changing even if the locale change is visible in the url

To Reproduce Look at the preview deployment of this https://github.com/The-Creative-Programming-Group/Weather-App/pull/213 here: https://weather-app-git-move-to-next-830f94-creative-programming-group.vercel.app/settings and try to change the locale with the button

Expected behavior All the texts change to the other language

About (please complete the following information):

Additional context I think the problem lays here: https://github.com/The-Creative-Programming-Group/Weather-App/blob/move-to-next-internationalization/apps/web/src/pages/settings/index.tsx

Abbosbek-cloud commented 7 months ago

There is my issue is related to yours. I think the cause is caching the translations.

If you find any solutions, let me know, please! I am looking for as well.

FleetAdmiralJakob commented 7 months ago

Thank you @Abbosbek-cloud I will look at the other issue and hope that this get fixed soon.

FleetAdmiralJakob commented 7 months ago

Is Duplicated