Skip to content

Bug Report: Language Switcher Not Updating UI #4

@arnab9957

Description

@arnab9957

📌 Title

Language Toggle (Hindi/English) Not Updating Content

📝 Description

The language switcher button (Hindi / English) in the sidebar is not properly updating the application language.

When clicking on the language toggle:

The selected button appears active

But the UI text does not change

Page content remains in the same language

No dynamic update occurs

This prevents users from switching between Hindi and English.

🔄 Steps to Reproduce

Open the application.

Open the sidebar menu.

Scroll to the bottom.

Click on:

हिंदी

or English

Observe that the language of the UI does not change.

Expected Behavior

On clicking Hindi:

All UI text should switch to Hindi.

On clicking English:

All UI text should switch to English.

Language preference should persist (optional enhancement).

The UI should re-render immediately after switching.

Actual Behavior

The language selection button changes state (if visually highlighted).

Content remains unchanged.

No re-render or translation update occurs.

📷 Screenshot

Image

💻 Environment

Browser: Chrome (or specify)

OS: Windows

Device: Desktop

🧠 Possible Causes

Language state not connected to global state/context.

Missing re-render trigger after language change.

i18n configuration issue.

Translation files not properly mapped.

Incorrect key usage in the translation function.

Language is not stored in localStorage/session.

The context provider is not wrapping the entire app.

Example possible issue (React):

const [language, setLanguage] = useState('en');

But components are not using that state.

🛠️ Suggested Fix

Ensure language state is globally managed (Context/Redux).

Verify i18n configuration.

Ensure all text uses translation keys instead of hardcoded strings.

Force re-render on language change.

Store the selected language in localStorage.

Confirm translation JSON files are properly structured.

🎯 Impact

Medium—Affects usability and accessibility for multilingual users.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions