diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d879156a..bdc9d8421b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Draft +- Create Language Selector Component (UI implementation) [#2562](https://github.com/bigcommerce/cornerstone/pull/2562) - Add net-new "order.pickup_addresses" to unify objects used on Order Details and Order Invoice pages [#2557](https://github.com/bigcommerce/cornerstone/pull/2557) ## 6.16.2 (06-18-2025) diff --git a/assets/scss/components/stencil/navUser/_navUser.scss b/assets/scss/components/stencil/navUser/_navUser.scss index c17b78d905..2ba05579aa 100644 --- a/assets/scss/components/stencil/navUser/_navUser.scss +++ b/assets/scss/components/stencil/navUser/_navUser.scss @@ -101,7 +101,8 @@ } .navUser-action--currencySelector + .dropdown-menu, -.navUser-action--channelSelector + .dropdown-menu { +.navUser-action--channelSelector + .dropdown-menu, +.navUser-action--languageSelector + .dropdown-menu { &::before { left: auto !important; // 6 right: spacing("half"); // 6 diff --git a/config.json b/config.json index 11db5376d2..1ff04f25bb 100644 --- a/config.json +++ b/config.json @@ -67,6 +67,33 @@ } ], "show_channels": false, + "language_selector_mock_data": { + "locales": [ + { + "is_default": true, + "is_selected": true, + "code": "en", + "name": "English", + "path": "/en" + }, + { + "is_default": false, + "is_selected": false, + "code": "fr", + "name": "Français", + "path": "/fr" + }, + { + "is_default": false, + "is_selected": false, + "code": "fr", + "name": "Español (Perú)", + "path": "/es-pe" + } + ], + "selected_locale_name": "English" + }, + "show_language_selector_mock_data": false, "hide_breadcrumbs": false, "hide_page_heading": false, "hide_category_page_heading": false, diff --git a/lang/en.json b/lang/en.json index da3e5a4c47..e005b86a16 100755 --- a/lang/en.json +++ b/lang/en.json @@ -145,6 +145,8 @@ "currency_switch_promotion" : "Promotions and gift certificates that don't apply to the new currency will be removed from your cart. Are you sure you want to continue?", "channel": "Store: {code}", "channel_switch_warning" : "Warning text for store switching", + "locale_switch_warning" : "Warning text for language switching", + "locale": "Language: {name}", "newsletter_signup": "Register for our newsletter", "form_submit": "Submit", "no_preference": "No Preference", diff --git a/schema.json b/schema.json index 8a2285bcaf..c8c25cd2e9 100644 --- a/schema.json +++ b/schema.json @@ -720,6 +720,11 @@ "label": "i18n.ChannelSelector", "id": "show_channels" }, + { + "type": "checkbox", + "label": "i18n.languageSelector", + "id": "show_channels" + }, { "type": "color", "label": "i18n.TextColor", diff --git a/schemaTranslations.json b/schemaTranslations.json index 7a9c3678ec..175fda4ef6 100644 --- a/schemaTranslations.json +++ b/schemaTranslations.json @@ -1652,6 +1652,9 @@ "pl": "Selektor witryny sklepu", "ja": "ストアフロントセレクターを表示" }, + "i18n.languageSelector": { + "default": "Show language selector" + }, "i18n.TextColor": { "default": "Text color", "fr": "Couleur du texte", diff --git a/templates/components/common/language-selector-mobile.html b/templates/components/common/language-selector-mobile.html new file mode 100644 index 0000000000..a6e91bbc2b --- /dev/null +++ b/templates/components/common/language-selector-mobile.html @@ -0,0 +1,34 @@ + + diff --git a/templates/components/common/language-selector.html b/templates/components/common/language-selector.html new file mode 100644 index 0000000000..007ddc553d --- /dev/null +++ b/templates/components/common/language-selector.html @@ -0,0 +1,35 @@ + diff --git a/templates/components/common/navigation-menu.html b/templates/components/common/navigation-menu.html index c7b45f7b90..95ae7844af 100644 --- a/templates/components/common/navigation-menu.html +++ b/templates/components/common/navigation-menu.html @@ -27,6 +27,13 @@ {{/unless}}