Skip to content

feat(i18n): Add English language support with vue-i18n#427

Closed
Eeman1113 wants to merge 2 commits into666ghj:mainfrom
Eeman1113:feat/i18n-english-support-updated
Closed

feat(i18n): Add English language support with vue-i18n#427
Eeman1113 wants to merge 2 commits into666ghj:mainfrom
Eeman1113:feat/i18n-english-support-updated

Conversation

@Eeman1113
Copy link
Copy Markdown

@Eeman1113 Eeman1113 commented Apr 1, 2026

Summary

  • Add comprehensive internationalization support using vue-i18n
  • Create complete English and Chinese locale files
  • Update all major UI components to use translation keys
  • Keep Chinese as default language - non-breaking change
  • Add language switcher in navbar for easy language toggling
  • Language preference saved to localStorage

Changes Made

  • Added vue-i18n@9 dependency
  • Created English locale file (frontend/src/locales/en.js) with complete translations
  • Created Chinese locale file (frontend/src/locales/zh.js) with existing Chinese text
  • Updated frontend/src/main.js to initialize i18n instance
  • Created LanguageSwitcher component for language toggling
  • Refactored components to use $t() translation function:
    • Home.vue: Complete UI translation including hero section, workflow steps, console
    • MainView.vue: Navigation and step names translation
    • HistoryDatabase.vue: History interface translation
  • Fixed template structure issues in Home.vue
  • Added language switcher to navbar in Home.vue

Benefits

  • Makes MiroFish accessible to international English-speaking users
  • Provides foundation for additional language support
  • Non-breaking change - Chinese remains default for existing users
  • Easy language switching between Chinese and English
  • Language preference persists via localStorage
  • Clean separation of UI text from component logic
  • Easy to extend with additional languages

Testing

  • Tested with both English and Chinese locales
  • All major UI components properly translate
  • Language switcher works correctly
  • Language preference saved and restored
  • No breaking changes to existing Chinese functionality
  • Default language set to Chinese for backward compatibility

Notes

  • Chinese (zh) is set as default language - existing users see no change
  • Language switcher added to navbar for easy language toggling
  • Users can easily switch between Chinese and English
  • All existing Chinese text preserved and properly organized in locale files
  • This is a non-breaking change - existing users continue to see Chinese UI

- Add vue-i18n dependency for internationalization
- Create English and Chinese locale files with complete translations
- Update main components to use translation keys instead of hardcoded text
- Set English as default language with Chinese fallback
- Add language toggle capability for future use
- Supports seamless switching between languages for all UI elements

This enables MiroFish to support both English and Chinese interfaces,
making it more accessible to international users.
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. enhancement New feature or request labels Apr 1, 2026
- Change default locale from English to Chinese (zh)
- Add language switcher component in navbar
- Users can switch between Chinese and English manually
- Language preference saved to localStorage
- Non-breaking change - existing users keep Chinese UI
- Maintains backward compatibility
@666ghj
Copy link
Copy Markdown
Owner

666ghj commented Apr 2, 2026

The project already has i18n support in place — please refer to [PR #428] for reference.

@666ghj 666ghj closed this Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants