mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-03 04:27:53 +00:00
14 lines
369 B
JavaScript
14 lines
369 B
JavaScript
export const navigateToLocalePage = () => {
|
|
const allLocaleSwitcher = document.querySelector('.locale-switcher');
|
|
|
|
if (!allLocaleSwitcher) {
|
|
return false;
|
|
}
|
|
|
|
const { portalSlug } = allLocaleSwitcher.dataset;
|
|
allLocaleSwitcher.addEventListener('change', event => {
|
|
window.location = `/hc/${portalSlug}/${event.target.value}/`;
|
|
});
|
|
return false;
|
|
};
|