Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching the language Problem #69

Closed
MZain-ul-Abideen opened this issue Nov 15, 2024 · 1 comment
Closed

Switching the language Problem #69

MZain-ul-Abideen opened this issue Nov 15, 2024 · 1 comment

Comments

@MZain-ul-Abideen
Copy link

MZain-ul-Abideen commented Nov 15, 2024

Bug
Switching the application language from English to a non-English option (e.g., Arabic) and then back to English causes the routing to break. Specifically:

  1. Routes fail to update correctly, leading to inconsistent navigation behavior.
    
  2. Some pages are not fully translated into the selected secondary language, resulting in partial content translations.
    

Steps to Reproduce

  1. Open the application, starting with the default English language setting.
    
  2. Change the language to Arabic (or any non-English option) using the language switcher.
    
  3. Switch back to English using the language switcher.
    
  4. Observe the following issues:
     4.1: The routes fail to update correctly and may not display the expected English content.
     4.2: Navigation to another route temporarily resolves the issue, suggesting a refresh problem.
     4.3: When in Arabic, certain pages are only partially translated, indicating incomplete translations.
    

Expected Behavior

  1. Switching back to English should restore English routes and content seamlessly, without additional user action.
  2. When selecting a non-English language (e.g., Arabic), all pages should display complete and accurate translations.

Actual Behavior

  1. Returning to English causes routing issues, with inconsistent content and navigation.
    
  2. Some pages remain untranslated or partially translated when switching to a non-English language (e.g., Arabic).
    
  3. Navigating to another route temporarily resolves the routing issue.
    

Screenshots
Screenshot from 2024-11-15 18-11-06

Environment

  • Browser: FireFox
  • OS: Majaro Linux
  • Node: 10.9.0

Possible Causes

  1. Route Refresh Logic: Improper handling of route updates during language transitions.
    
  2. State Management Issues: Cached or inconsistent state is not being properly cleared.
    
  3. Translation Files: Missing or incomplete translations for some pages in the secondary language (e.g., Arabic).
    

Proposed Solutions

  1. Route Handling:
    Ensure route updates are correctly triggered and refreshed during language switches.
  2. State Management:
    Investigate state handling (e.g., Redux, Vuex, Context API) and verify proper state reinitialization during language changes.
  3. Translation Files:
    Validate that all translation files are complete and accurately loaded when switching languages.
  4. Testing:
    Introduce automated tests to verify routing and translation behavior for all supported languages.

Additional Context

  • The issue could stem from the i18n implementation or the interaction between the language switcher and the routing system.
    
  • Refer to relevant documentation for i18n troubleshooting (e.g., Vue I18n, React-i18next, or another library specific to the project).
    
Copy link

@MZain-ul-Abideen this issue was automatically closed because it did not follow the bellow rules:

IMPORTANT: Please use the following link to create a new issue:

https://www.creative-tim.com/new-issue/vue-black-dashboard

**If your issue was not created using the app above, it will be closed immediately.**



Love Creative Tim? Do you need Angular, React, Vuejs or HTML? You can visit:
👉  https://www.creative-tim.com/bundles
👉  https://www.creative-tim.com


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

No branches or pull requests

1 participant