feat(i18n): add language switcher and remove unused locales (Closes #89)#95
Merged
Merged
Conversation
Resolves reactplay#89. Adds a new LanguageSwitcher component to the navbar. Updates i18n config to support only en, bn, and hi, removing fr.
✅ Deploy Preview for reactkolkata ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
|
@mdnm18 there are some conflicts please fix |
Contributor
Author
|
@priyankarpal |
Member
|
but there are some conflicts @mdnm18 in this pr |
Contributor
Author
|
@priyankarpal , I have resolved all the merge conflicts. This PR should be ready to merge now. |
adi-ray
suggested changes
Oct 22, 2025
@priyankarpal I've accepted the typo fixes. This should be all set! Co-authored-by: Aditya Ray <96347576+adi-ray@users.noreply.github.com> Signed-off-by: MD NAYAJ MONDAL <md.n.m.pius18@gmail.com>
Contributor
Author
|
@priyankarpal I've resolved all the merge conflicts and accepted the typo suggestions from @adi-ray. And I think this PR should be ready to go now! If you have any suggestions please do let me know. |
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.

Resolves #89. Adds a new LanguageSwitcher component to the navbar. Updates i18n config to support only en, bn, and hi, removing fr.
Summary
This PR resolves Issue #89 by adding a new LanguageSwitcher component to the navbar. It also updates the i18n configuration to support only English, Bengali, and Hindi, removing French and Spanish as requested.
Changes
Created new LanguageSwitcher component in src/components/custom/language-switcher/index.tsx.
Added the required dropdown-menu component from shadcn/ui.
Updated src/config/i18n/navigation.ts to set locales to ["en", "bn", "hi"].
Added the LanguageSwitcher component to both the desktop and mobile views in src/components/common/navbar/index.tsx.
Deleted src/config/i18n/content/fr.json (and es.json if it existed) as it's no longer supported.
Added LanguageSwitcher translation keys to en.json, bn.json, and hi.json for accessibility.
Testing
I tested these changes locally by:
Running npx shadcn@latest add dropdown-menu to install the required UI component.
Running the project using docker-compose up.
Verified the new globe icon is present in the navbar (both desktop and mobile).
Clicked the icon and confirmed the dropdown shows only "English", "বাংলা", and "हिन्दी".
Clicked each language and verified the site's language and URL updated correctly (e.g., to /bn).
Manually navigated to http://localhost:3000/fr, which correctly resulted in a 404 Not Found page.
Related Issue
Resolves #89
Notes
No special notes. This completes the feature request and the i18n cleanup.