|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { computed } from 'vue'
|
|
|
|
|
import { computed, watch } from 'vue'
|
|
|
|
|
import { ensureStartingSlash } from '../../shared'
|
|
|
|
|
import { useData } from './data'
|
|
|
|
|
import { hashRef } from './hash'
|
|
|
|
@ -15,6 +15,10 @@ export function useLangs({
|
|
|
|
|
(localeIndex.value === 'root' ? '/' : `/${localeIndex.value}/`)
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
watch(page, () => {
|
|
|
|
|
hashRef.value = location.hash ? location.hash : ''
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
const localeLinks = computed(() =>
|
|
|
|
|
Object.entries(site.value.locales).flatMap(([key, value]) =>
|
|
|
|
|
removeCurrent && currentLang.value.label === value.label
|
|
|
|
|