Hahn-Solo Product Management
  • Dashboard
  • Technologies
  • Competitors
  • Tasks
Theme
Basic Information
Status
Open
Priority
Next
Category
Bug Fix
Repo
JSS PM
Effort
Moderate
Task ID
T-FB486CCF
Details
Fix Link Component Locale Handling
Investigate and fix issue #2172 in `packages/sitecore-jss-nextjs` where the `Link` component hardcodes `locale={false}`, breaking navigation for `languageEmbedding="asNeeded"` configurations. This bug exists in the Next.js package which has a direct Content SDK equivalent — the fix should be forward-ported to Content SDK as well.
Why
The Link component locale bug affects both JSS and Content SDK Next.js deployments. Fixing it in JSS and porting forward ensures mid-migration teams are not caught by the same bug in both SDKs.
Evidence
GitHub issue #2172; affects `@sitecore-jss/sitecore-jss-nextjs`
Details
Context: Issue #2172 reports that the `Link` component in `@sitecore-jss/sitecore-jss-nextjs` hardcodes `locale={false}` on the underlying Next.js `Link`, which breaks navigation for sites configured with `languageEmbedding="asNeeded"`. This bug is in the Next.js integration package, which has a direct Content SDK equivalent (`@sitecore-content-sdk/nextjs`). The fix benefits both JSS consumers and teams mid-migration.

Steps:
1. Open `packages/sitecore-jss-nextjs/src/components/Link.tsx`
2. Identify where `locale={false}` is hardcoded
3. Refactor to conditionally pass `locale` based on the site's `languageEmbedding` configuration
4. Add unit tests covering `languageEmbedding="asNeeded"`, `"always"`, and `"never"` modes
5. Open a companion issue/PR on the Content SDK repo to forward-port the fix
6. Update CHANGELOG

Acceptance criteria:
Link component respects `languageEmbedding` configuration
Unit tests cover all three `languageEmbedding` modes
Companion Content SDK issue created
CI passes

Risks: Changing locale handling could affect sites that depend on the current `locale={false}` behavior. The fix should use the configuration value, not remove `locale={false}` entirely, to avoid breaking existing deployments.
Source Report
reports/product-management/jss/2026-04-05-jss-pm.md
Report date: Apr 5, 2026