Skip to content

Persist locale across reloads and tabs #70

Description

@Kalebtron1

Why this matters

A locale switch should survive refreshes and stay consistent across tabs.

Problem

Locale state can be lost depending on session behavior.

Scope

  • Persist the selected language in local storage.
  • Restore it on startup.
  • Keep tabs consistent when the app is reopened.

Setup Steps

  • Clone the repository and run npm install at the repo root.
  • Change the language in npm run dev and reload the page.
  • Open a second tab to confirm the saved locale is reused.

File Paths

  • src/App.tsx
  • src/components/WalletSetupModal.tsx
  • src/pages/Login.tsx
  • src/pages/Onboarding.tsx

Implementation guidance

  • Hook into the existing selector or locale state.
  • Load the saved locale before the app renders meaningful UI.
  • Keep the persistence logic isolated from unrelated code.

Acceptance criteria

  • Locale survives refresh and new tabs use the saved value.
  • Reviewer can confirm the saved language without reselecting it.
  • Fallback locale still works if the stored value is invalid.

Validation

  • Change the locale, reload, and confirm persistence.
  • Open a second tab and verify the same locale is used.

PR requirements

  • Include Closes #70.
  • Include before/after behavior notes.

Complexity

  • Medium (100 points)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programcomplexity:medium150 points - standard feature touching multiple areasfrontendFrontend implementation worki18nInternationalization and localization work

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions