Skip to content

Add multilingual UI support with language switcher for key dashboard elements#329

Open
Rovina05 wants to merge 2 commits intomainfrom
rovina/feature/language-switcher
Open

Add multilingual UI support with language switcher for key dashboard elements#329
Rovina05 wants to merge 2 commits intomainfrom
rovina/feature/language-switcher

Conversation

@Rovina05
Copy link
Copy Markdown
Collaborator

@Rovina05 Rovina05 commented Apr 30, 2026

This PR introduces basic multilingual support to the Employer Dashboard by adding a language switcher and centralizing UI text using a translations file.

Implementation details:

  • Created a new translations module (src/i18n/translations.js) to store UI text for multiple languages (English, Hindi, Punjabi, Chinese)
  • Added a language switcher (EN, HI, PA, ZH) to the Employer Dashboard UI
  • Implemented dynamic text rendering using a translations object (t[key]) based on selected language
  • Replaced key hardcoded UI elements with translation keys, including:
    • Dashboard headings (Overview, Incident Reports, Recent Review)
    • Primary actions (Create Shift, Reset, View Review)
    • Search placeholder
    • Incident summary labels (Total, Pending, Resolved, Showing)
    • Loading and empty states

Design considerations:

  • Changes are scoped only to the Employer Dashboard to avoid impacting other components
  • No backend/API changes were made
  • Existing business logic, state management, and layout were not modified
  • Language switching is handled locally within the component for simplicity
language switch

@neethuchandhavarkar
Copy link
Copy Markdown
Collaborator

Checkout the branch into local machine. Tested the feature. The biggest flaw in this functionality implemented is that the whole application is not set to the language that it is changed to. Also when I refresh or even go to another page, it will reset to english, whichi should not happen. If the language is changes, it should be consistent throughout the application. Please update the pull request. Please follow the design in Figma.

Screenshot

image

@Rovina05 Rovina05 force-pushed the rovina/feature/language-switcher branch from 232a4b1 to 6b553f5 Compare May 7, 2026 07:11
@Rovina05
Copy link
Copy Markdown
Collaborator Author

Rovina05 commented May 7, 2026

Hey Neethu, I’ve updated the PR with the cleaned multilingual UI changes and synced it with the latest main branch.

I also updated the language/profile dropdown styling to follow the Figma design more closely. The selected language now persists across page navigation and refreshes using localStorage, so it remains consistent throughout the application instead of resetting back to English.
updated

@neethuchandhavarkar
Copy link
Copy Markdown
Collaborator

This branch have conflicts, please pull the changes and raise the request again

@Rovina05 Rovina05 force-pushed the rovina/feature/language-switcher branch from 6b553f5 to 91acb0f Compare May 9, 2026 05:28
@Rovina05
Copy link
Copy Markdown
Collaborator Author

Rovina05 commented May 9, 2026

Hi Neethu, I resolved the merge conflicts and rebased the branch with the latest main branch changes.

@neethuchandhavarkar
Copy link
Copy Markdown
Collaborator

Checkout the branch into local machine. The language change is working as intended but there are a few bugs. As shown in the screenshot below, there is letter g in the daily activity monitoring page. Also the link to the company profile page is missing, more of it has been removed which should not be the case. A suggestion is to link the company profile page to the Section of the logo and company name. That section is also not following the figma design as it is supposed to be blue color. Another thing, the logo seems to be squished. Please fix it.

Screenshot

image

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.

2 participants