quran.com-frontend-next
quran.com-frontend-next copied to clipboard
[bug]: Selected language is not persisting when revisiting quran.com
Is there an existing issue for this?
- [X] There is no exsiting issue for this bug
Describe the bug
Setting a language perviously would cause the web app to keep the setting and have that language, as it takes the value from the NEXT_LOCALE cookie. The issue is only visible on prod and on beta environments. Also the NEXT_LOCALE cookie is set all the times.
Relevant log output
No response
Steps to reproduce
- Visit quran.com
- Click the globe icon and choose a language
- Close the tab and reopen quran.com
Environment (please complete the following information) and Add any other context about this bug
Tested on Macbook pro:
- Safari -> Version 17.3.1 (19617.2.4.11.12)
- Chrome -> Version 122.0.6261.94 (Official Build) (arm64)
- Brave -> Version 1.63.165 Chromium: 122.0.6261.94 (Official Build) (arm64) -- Based on chrome
- Firefox -> Version 123.0.1 (64-bit)
Environment
Production(quran.com)
Weird, I experience same on production site, but no issue when run it locally! Is it same for you?
Also, was wondering, is prefixing default locale maybe nice to have generally? From what I can see NEXT_LOCALE cookie works only when app is opened on /, so for example even with the cookie, if you open not prefixed URL on some surah or any other page, you won't get language from cookie?
Weird, I experience same on production site, but no issue when run it locally! Is it same for you?
Also, was wondering, is prefixing default locale maybe nice to have generally? From what I can see NEXT_LOCALE cookie works only when app is opened on
/, so for example even with the cookie, if you open not prefixed URL on some surah or any other page, you won't get language from cookie?
Yes it does work locally for me. Well If i set a language and then goto /login, it wont change the language to the one I have set, so indeed it does set it when opening /