Embed guide: the Nuxt form of the language listener, and carrying the open tab across a locale route
This commit is contained in:
parent
abdc5dfe61
commit
5923971946
1 changed files with 4 additions and 0 deletions
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue