Skip to content

feat: add persistent locale throughout the site#699

Closed
shivangrathore wants to merge 1 commit intoruxailab:developfrom
shivangrathore:locale-persist
Closed

feat: add persistent locale throughout the site#699
shivangrathore wants to merge 1 commit intoruxailab:developfrom
shivangrathore:locale-persist

Conversation

@shivangrathore
Copy link
Contributor

@shivangrathore shivangrathore commented Mar 14, 2025

What Does This PR Do?

This PR resolves an issue where the locale setting is not persisted between page reloads.

Fixes #698

Changes Made

  • Added logic to store the locale in localStorage and retrieve it on page load.
  • Implemented a mechanism to save the locale to localStorage whenever it is changed.

Reason for Change

The locale setting was being reset on page reload, causing a poor user experience. This change ensures the selected locale is preserved across sessions.

Testing

Manually tested in the development environment. The locale now persists correctly after page reloads.

Before

locale-persist-before-2.mp4

After

locale-persist-after-2.mp4

@sonarqubecloud
Copy link

@sahitya-chandra
Copy link
Member

sahitya-chandra commented Mar 15, 2025

@shivangrathore, before opening a PR, you should check if the PR related to this feature already exists or not.
I have already fixed this issue a few weeks ago #613

@sahitya-chandra
Copy link
Member

@shivangrathore You should close this now.

@drp5
Copy link
Contributor

drp5 commented Mar 18, 2025

This PR duplicates the work already done in #613, which has already fixed the issue. It is recommended to close this PR to avoid redundancy.

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.

[🐞 BUG]: Locale changes dont persist on page reload.

3 participants