Skip to content

feat(i18n): add language selector with EN/ES toggle and localStorage …#61

Open
Ayilojay wants to merge 1 commit into
Kalebtron1:mainfrom
Ayilojay:feat/language-selector
Open

feat(i18n): add language selector with EN/ES toggle and localStorage …#61
Ayilojay wants to merge 1 commit into
Kalebtron1:mainfrom
Ayilojay:feat/language-selector

Conversation

@Ayilojay
Copy link
Copy Markdown

Summary

Adds a language selector to the Profile page that lets users switch between
Spanish and English. The selection is applied immediately and persisted across
refreshes and new sessions via localStorage.

Changes

  • src/i18n/locales/en.ts — Full English locale mirroring the existing es.ts
    structure (all namespaces: common, nav, login, onboarding, home, credit,
    deposit, activity, history, profile, withdrawals, notifications, help,
    nft_modal)
  • src/i18n/config.ts — Registers en resource; reads vinculo_language from
    localStorage on init to restore the saved preference
  • src/i18n/useLanguage.ts — changeLanguage() now writes to localStorage before
    delegating to i18next
  • src/components/LanguageSelector.tsx — Minimal ES / EN pill toggle,
    mobile-friendly, highlights the active language
  • src/pages/Perfil.tsx — Mounts LanguageSelector in a card above the settings
    menu

How to test

  1. Open the app and go to Profile.
  2. Tap English — all translated strings switch immediately.
  3. Refresh the page — English is still active.
  4. Tap Español — switches back; refresh confirms persistence.
  5. Repeat on a mobile viewport.

Acceptance criteria

  • User can switch language in UI
  • Selection persists across refresh and new session

close #8

@vercel
Copy link
Copy Markdown

vercel Bot commented May 30, 2026

@Ayilojay is attempting to deploy a commit to the alankcr1-6443's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@Ayilojay Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add a language selector

1 participant