feat: add multi-language support (EN/PT/ES)#55
Merged
Conversation
Deploying portifolio with
|
| Latest commit: |
00f92c3
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://27e40fcf.portifolio-1p0.pages.dev |
| Branch Preview URL: | https://feature-i18n.portifolio-1p0.pages.dev |
The plugin generated a dist/wrangler.json with an 'assets' field that Cloudflare Pages rejects. The site is a static SPA, so the plugin is unnecessary.
…cher styling - Renamed locale from pt to br (Portuguese → Brazilian Portuguese) - Mapped pt / pt-BR browser languages to br - Improved language switcher colors: subtler active state, hover feedback, glass backdrop
Translated strings were used as React keys, causing elements to unmount/remount when switching languages. This broke scroll-reveal observations and made content briefly disappear. Switched to stable array indices for translated arrays.
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.
Summary
Adds lightweight, dependency-free internationalization to the portfolio site with support for English, Portuguese, and Spanish.
What's included
src/i18n/)en|pt|es) and translation shape.src/components/language-switcher.tsx)localStorageunderpreferred-language.langattribute syncs with the active language.Detection order
localStoragenavigator.languages/navigator.language)Validation
npm run fmt✅npm run check✅npm run build✅