diff --git a/__tests__/e2e/.vitepress/config.ts b/__tests__/e2e/.vitepress/config.ts index 65f845ab364d..3989835956db 100644 --- a/__tests__/e2e/.vitepress/config.ts +++ b/__tests__/e2e/.vitepress/config.ts @@ -159,6 +159,36 @@ export default defineConfig({ lazyLoading: true } }, + locales: { + root: { + label: 'English', + link: 'https://vitepress.dev', + repository: { + link: 'https://github.com/vuejs/vitepress', + title: 'English Repository' + } + }, + es: { + label: 'Español', + link: 'https://vitepress.dev/es/', + repository: { + // for testing purposes + link: 'https://github.com/vuejs/core', + icon: 'gitlab', + title: 'Repositorio en Español' + } + }, + zh: { + label: '简体中文', + link: 'https://vitepress.dev/zh/', + repository: { + // for testing purposes + link: 'https://github.com/vitejs/vite', + icon: 'bitbucket', + title: '中文存储库' + } + } + }, themeConfig: { nav, sidebar, diff --git a/src/client/theme-default/components/VPNavBarTranslations.vue b/src/client/theme-default/components/VPNavBarTranslations.vue index a92aad8c9a46..4d997ee15b2a 100644 --- a/src/client/theme-default/components/VPNavBarTranslations.vue +++ b/src/client/theme-default/components/VPNavBarTranslations.vue @@ -3,6 +3,7 @@ import VPFlyout from './VPFlyout.vue' import VPMenuLink from './VPMenuLink.vue' import { useData } from '../composables/data' import { useLangs } from '../composables/langs' +import VPSocialLink from "./VPSocialLink.vue"; const { theme } = useData() const { localeLinks, currentLang } = useLangs({ correspondingLink: true }) @@ -16,10 +17,28 @@ const { localeLinks, currentLang } = useLangs({ correspondingLink: true }) :label="theme.langMenuLabel || 'Change language'" >
{{ currentLang.label }}
+{{ currentLang.label }}
-