feat(i18n): add frontend internationalization with browser language d… - #385
Open
kirinsir wants to merge 1 commit into
Open
feat(i18n): add frontend internationalization with browser language d…#385kirinsir wants to merge 1 commit into
kirinsir wants to merge 1 commit into
Conversation
…etection ## Frontend Changes Only Complete i18n implementation for both admin-ui and account-ui: - React i18next integration with JSON locale files - LanguageSwitcher component for manual language switching - Browser language detection with fallback to English - 613 keys in admin-ui, 219 keys in account-ui ## Language Detection Logic 1. Priority 1: localStorage saved preference 2. Priority 2: Browser language (navigator.language) - Browser language starting with 'zh' → Chinese - All other languages → English 3. Fallback: English (project is English-first) ## Files Modified **admin-ui/** (28 files, 613 keys) - All components converted to use i18n hooks - New: i18n/ directory with en.json, zh.json - New: LanguageSwitcher.tsx component - package.json: added i18next dependencies **account-ui/** (24 files, 219 keys) - All components converted to use i18n hooks - New: i18n/ directory with en.json, zh.json - New: LanguageSwitcher.tsx component - package.json: added i18next dependencies ## No Server-Side Changes This PR contains only frontend changes. No Go code, HTML templates, or OAuth2 error messages were modified.
Owner
|
Hi @kirinsir thank you for putting this together. It's looking really good. Before we can merge it does need a few fixes. Can you make another pass an make sure all the translations are only in the locales? |
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.
…etection
Frontend Changes Only
Complete i18n implementation for both admin-ui and account-ui:
Language Detection Logic
Files Modified
admin-ui/ (28 files, 613 keys)
account-ui/ (24 files, 219 keys)
No Server-Side Changes
This PR contains only frontend changes. No Go code, HTML templates, or OAuth2 error messages were modified.