-
Notifications
You must be signed in to change notification settings - Fork 85
feat(web): add multi-language support (en, fr, de, es, it) #142
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
Draft
jjacque
wants to merge
35
commits into
master
Choose a base branch
from
ai-multi-lang
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Co-authored-by: eranchetz <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
…eout Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
…essage from vault Signed-off-by: Jeremy JACQUE <[email protected]>
…GetMsgHandler Signed-off-by: Jeremy JACQUE <[email protected]>
…css) Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
0ab952a to
6063a26
Compare
Contributor
Author
Signed-off-by: Jeremy JACQUE <[email protected]>
92db920 to
c6a7c7a
Compare
Signed-off-by: Jeremy JACQUE <[email protected]>
…JS arch Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
Signed-off-by: Jeremy JACQUE <[email protected]>
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.

Summary
This PR introduces comprehensive internationalization (i18n) support to the application, enabling users to view the interface in 5 languages: English, French, German, Spanish, and Italian.
Note: This PR is built on top of PR #140 and PR #143
Static Asset Size Analysis
Core Files (minified)
(Minified)
(Minified & Gzipped)
(Minified & Gzipped)
New Translation Files
(Minified & Gzipped)
Total Impact
Note: Translation files are loaded asynchronously on-demand (only the selected language is fetched), so the actual page load increases by only ~435 bytes uncompressed or ~280 bytes gzipped + one locale file (~300 bytes gzipped).
Gzip Compression: The Gzip middleware provides ~70% compression on text assets, reducing total transfer size from 19.7KB to 5.9KB. This makes the multi-language feature essentially bandwidth-neutral compared to the original.
Changes Overview
Core Features
Technical Details
utils.js Module:
detectLanguage(): Auto-detect from URL param?lang=fror browserisValidLanguage(): Validate supported language codes (en, fr, de, es, it)loadTranslations(): Fetch JSON translations asynchronouslyapplyTranslations(): Update DOM elements withdata-i18nattributesupdateMetaTags(): Update title, description, Open Graph tagsswitchLanguage(): Change language with URL persistenceCSP Compliance:
onchange="..."withaddEventListener()UI Improvements:
langattribute updatesPerformance Optimization:
Vary: Accept-EncodingheadersTesting
?lang=frmaintains selectionRelated Commits
c03c956- Add minify step for static resourcesd3fe4fa- Add language header support in handlers2a9bebf- Add multi-lang support (en,fr,es,de,it)Performance Impact