feat: add next-intl i18n, Spanish translation, language selector, glossary tooltips#848
Merged
Conversation
|
@Adeolu01 is attempting to deploy a commit to the Stephen's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Adeolu01 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
next-intland configures it vianext.config.jsusingcreateNextIntlPlugini18n.tsprovidesgetRequestConfigwith locale validation and dynamic message loadingmiddleware.tsruns locale detection from theAccept-Languageheader, falls back toen, and enables URL-prefix routing (/es/) vialocalePrefix: "as-needed"so existing routes at/,/connect,/escrow, etc. are unaffectedmessages/en.jsonandmessages/es.jsoncover navigation labels, hero section, form fields, error messages, escrow status strings, and language names; Spanish uses formal usted register throughoutapp/[locale]/layout.tsxwraps the locale segment withNextIntlClientProvider;app/[locale]/page.tsxrenders the full landing page usinguseTranslationsso/es/serves every hero string, nav label, stat, and program card in Spanishcomponents/ui/language-selector.tsxis a dropdown showing flag and language name; selecting a locale navigates to/esor/and persists the preference tolocalStorageLanguageSelectoris added to both the desktop and mobile sections ofcomponents/landing/Navbar.tsxlib/glossary.tsdefines bilingual (en/es) definitions for escrow, XLM, Soroban, Freighter, gas fee, smart contract, and testnetcomponents/ui/glossary-term.tsxwraps any inline text and shows a tooltip on hover or focus with the definition in the current locale, auto-detected from the URL pathnameTest plan
npm installto pull innext-intlGET /loads the landing page in EnglishGET /esloads the landing page with all hero and nav strings in SpanishAccept-Language: esheader onGET /redirects or serves Spanish/and/esand persists tolocalStorageGlossaryTermshows the tooltip in the correct locale/connect,/escrow,/wallet,/historyare unaffectedcloses #753
closes #754
closes #757
closes #758