feat(storefront): SD-11500 render native language names on storefront using Intl.DisplayNames#2607
Merged
bc-yevhenii-buliuk merged 1 commit intobigcommerce:masterfrom Feb 16, 2026
Conversation
parthshahp
approved these changes
Feb 11, 2026
Contributor
|
@bc-yevhenii-buliuk Why are languages other than English showing up in lower case? |
Contributor
Author
@jkanive this is the correct native representation according to each language's orthographic rules, e.g.
As an option, we could use CSS to maintain native names with consistent capitalization.
|
a737789 to
b369c64
Compare
… using Intl.DisplayNames
b369c64 to
7cbd986
Compare
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.

What?
This PR adds native language name rendering using the browser's
Intl.DisplayNamesAPI, eliminating the need for backend language name storage.Details:
1. Temporary Test Markup
A temporary test markup component (
test-lang-selector.html) has been added to visually verify the language name rendering logic. This component is included innavigation.htmlwith a TODO comment and will be removed before merging this PR.2. Fallback Behavior
If the
Intl.DisplayNamesAPI is not supported by the browser or fails for any reason, language codes will be displayed as-is (e.g., 'en', 'es', 'fr'). This graceful degradation ensures the language selector remains functional in older browsers.3. UI Label Localization
The "Language" label that appears in the UI (e.g., "Language: English") is localized through the existing
lang/*.jsontranslation system, not viaIntl.DisplayNames.4. Active Language Formatting
Following the pattern established by the currency selector, the currently active language is wrapped in a
<strong>tag for visual emphasis. The JS logic preserves this formatting by updating only the text content within the<strong>element, leaving the surrounding structure intact.
5. Active Language Code Architecture
To avoid iterating through the languages array to find the active language within the
<a class="navUser-action navUser-action--languageSelector">element, a newactive_locale_codeproperty will be added to the Stencil context in SD-11311. This property will be derived from theis_activekey and placed at the same level as the languages array, mirroring the consistent pattern used in the currency selector ( active_currency_code ).Stencil Context Structure:
Requirements
Tickets / Documentation
Screenshots (if appropriate)