Implement multi-language interface (i18n) support - #1705
Open
anshul23102 wants to merge 1 commit into
Open
Conversation
- Add i18next library for translation management with browser language auto-detection - Create locale JSON files for English and Hindi with comprehensive UI strings - Implement i18n initialization with localStorage persistence for language preference - Add language selector component for Settings page - Support automatic language detection from browser navigator.language - Provide manual language override in settings with persistent storage - Add INTERNATIONALIZATION.md with documentation for adding new languages - Expose translation APIs: t(), setLanguage(), getCurrentLanguage(), getAvailableLanguages() - Support data-i18n attributes for declarative HTML element translation
Contributor
Author
|
Thank you for reviewing this PR! When you have a moment, please review the changes and consider adding these labels:
Thank you! |
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.
Fixes #1141
Summary
Implements comprehensive internationalization (i18n) support for the QyverixAI interface. Users can now interact with the application in multiple languages with automatic browser language detection and manual selection via settings.
Changes
Library Integration
frontend/locales/en.json- English (default)frontend/locales/hi.json- Hindi (हिन्दी)Core Features
navigator.languageqyx_language)Implementation Files
frontend/js/i18n-init.js- i18n initialization and core functions:initializeI18n()- Loads locale files and configures i18nextsetLanguage(lang)- Changes active languaget(key)- Helper function for translations in JavaScriptupdatePageTranslations()- Updates DOM with current languagefrontend/js/language-selector.js- Language selector UI component:id="language-settings"HTML Updates
data-i18nattributes for declarative translationTranslation Keys
Organized hierarchically:
app.*- Application metadatanavigation.*- Menu itemsbuttons.*- Button labelslabels.*- Form labelsmessages.*- User feedback messageserrors.*- Error notificationssettings.*- Settings page stringsauth.*- Authentication pagesshortcuts.*- Keyboard hintsDocumentation
frontend/INTERNATIONALIZATION.md- Complete guide for:Language Support
Currently Shipped:
Easy to Add (see INTERNATIONALIZATION.md):
Usage Examples
In HTML
In JavaScript
Backward Compatibility
Testing
data-i18nattributes translate correctly