feat: integrate GLOBAL-1 multilingual website foundation#114
Draft
support371 wants to merge 28 commits into
Draft
feat: integrate GLOBAL-1 multilingual website foundation#114support371 wants to merge 28 commits into
support371 wants to merge 28 commits into
Conversation
Contributor
|
Deployment failed with the following error: Learn More: https://vercel.com/docs/concepts/projects/project-configuration |
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Reviewer's GuideIntroduces a non-breaking multilingual infrastructure for the GEM Enterprise Next.js app, including server-side locale resolution, client-side i18n context, localized global navigation/footer, a validated locale API with cookie persistence, translation workflow automation, and CI i18n validation integrated into the main pipeline. Sequence diagram for server-side locale resolution and layout renderingsequenceDiagram
participant Browser
participant RootLayout
participant getRequestLocale
participant getDictionary
participant I18nProvider
participant GlobalNavigation
participant GlobalFooter
Browser->>RootLayout: HTTP request
RootLayout->>getRequestLocale: getRequestLocale()
getRequestLocale->>cookies: cookies()
getRequestLocale->>headers: headers()
getRequestLocale-->>RootLayout: locale
RootLayout->>getDictionary: getDictionary(locale)
getDictionary-->>RootLayout: dictionary
RootLayout->>I18nProvider: render I18nProvider locale,dictionary
I18nProvider-->>GlobalNavigation: useI18n()
I18nProvider-->>GlobalFooter: useI18n()
RootLayout-->>Browser: HTML with html.lang, html.dir
Sequence diagram for client-side language change via /api/localesequenceDiagram
actor User
participant LanguageSwitcher
participant LocaleApi as api_locale_route
participant NextResponse
participant Router as next_navigation_router
User->>LanguageSwitcher: select new locale
LanguageSwitcher->>LanguageSwitcher: changeLocale(nextLocale)
LanguageSwitcher->>LocaleApi: fetch("/api/locale", POST, { locale })
LocaleApi->>LocaleApi: localeSchema.safeParse(payload)
alt invalid locale or JSON
LocaleApi-->>LanguageSwitcher: 400 { ok:false, error }
LanguageSwitcher->>LanguageSwitcher: setError("Language update failed")
else valid locale
LocaleApi->>NextResponse: NextResponse.json({ ok:true, locale })
NextResponse->>NextResponse: cookies.set(LOCALE_COOKIE)
NextResponse-->>LanguageSwitcher: 200 { ok:true, locale }
LanguageSwitcher->>document: update documentElement.lang, documentElement.dir
LanguageSwitcher->>Router: router.refresh() (startTransition)
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
gem-enterprise | 918dfa4 | Jun 26 2026, 11:19 AM |
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 a non-breaking multilingual foundation to the existing GEM Enterprise Next.js application while preserving the current public routes, authentication, KYC, admin, and client portal architecture.
Implemented
/api/localepreference endpointgt.config.jsonArchitecture decision
Locale prefixes were not added to the existing URLs. This avoids disrupting protected-route redirects, KYC state transitions, portal links, and admin RBAC. The selected locale is resolved server-side from the
gem-localecookie or the browserAccept-Languageheader.Validation status
dir="rtl".Required external configuration
Add these GitHub Actions secrets before running the automated translation workflow:
GT_PROJECT_IDGT_API_KEYExisting Vercel deployment secrets remain required by the production workflow.
Review checklist
This PR is intentionally a draft until CI and preview verification are complete.
Summary by Sourcery
Introduce a cookie- and header-driven multilingual foundation for the GEM Enterprise Next.js app, localizing the global layout shell while preserving existing routes and portals.
New Features:
Enhancements:
Build:
CI:
Deployment:
Documentation: