Skip to content

Commit

Permalink
Adding support for localize link in region picker
Browse files Browse the repository at this point in the history
  • Loading branch information
bandana147 committed Jul 23, 2024
1 parent 3ca2de5 commit bd618fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/blocks/global-footer/global-footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
getMetadata,
getConfig,
loadBlock,
localizeLink,
} from '../../utils/utils.js';

import {
Expand Down Expand Up @@ -258,6 +259,7 @@ class Footer {
} else {
// No hash -> region selector expands a dropdown
regionPickerElem.href = '#'; // reset href value to not get treated as a fragment
regionSelector.href = localizeLink(regionSelector.href);
decorateAutoBlock(regionSelector); // add fragment-specific class(es)
this.elements.regionPicker.append(regionSelector); // add fragment after regionPickerElem
await loadBlock(regionSelector); // load fragment and replace original link
Expand Down

0 comments on commit bd618fd

Please sign in to comment.