feat: add multilingual (English/Hindi) support with real language swi… - #146
Open
Ritwij07 wants to merge 1 commit into
Open
feat: add multilingual (English/Hindi) support with real language swi…#146Ritwij07 wants to merge 1 commit into
Ritwij07 wants to merge 1 commit into
Conversation
…tcher
- Add i18n scaffolding: LanguageContext (React context + t() hook,
persists choice to localStorage) and a typed translations
dictionary (translations.ts) covering portal branding, landing
page hero/stats/vision copy, and the full login form.
- Add LanguageSwitcher component: a real dropdown that actually
switches language, replacing the decorative English/Hindi <select>
on the landing page's top strip that previously just called
alert('हिन्दी भाषा में बदलें') and changed nothing.
- Wire the switcher into LandingView, LoginView, and the dashboard
Layout topbar (visible on every authenticated page too).
- Fully compatible with the current dark-mode theming — all new
UI respects dark: variants already used across the app.
- Adding a new language going forward only requires one entry in
SUPPORTED_LANGUAGES plus one dictionary block in translations.ts.
Scope note: dashboard sidebar navigation items (Students, Worksheets,
Reports, etc.) are intentionally left in English for this PR to keep
the diff reviewable — the i18n plumbing is fully reusable for a
follow-up PR to extend coverage there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…tcher