Embed guide: the Nuxt form of the language listener, and carrying the open tab across a locale route

This commit is contained in:
Doxa Maps 2026-10-01 10:34:51 +00:00
parent abdc5dfe61
commit 5923971946

View file

@ -97,6 +97,10 @@ a cancelable `doxa-language-request` event (it bubbles and crosses shadow roots)
})
```
On Nuxt with @nuxtjs/i18n that call is `navigateTo(switchLocalePath(e.detail.language))`;
switchLocalePath already keeps the query and hash. If a new locale route re-mounts the page, carry the
open tab across: keep the id from `tab-change` (`e.detail[0].id`) in `?tab=`, which the gallery reads.
- **You do nothing:** the gallery switches itself. The reader's pick then holds even over a `language`
you passed, until you change that attribute again. The gallery never writes your page's URL.