Replies: 1 comment
-
That was broken. Refer the new docs: https://vitepress.vuejs.org/guide/i18n and update your vitepress version. It will looks somewhat like this: // ...
export default defineConfig({
title: "Hview UI", // if title is same for both locales, just define it at top
locales: {
root: {
label: "中文",
lang: "zh-CN",
themeConfig: {
nav: getNavRouter(),
sidebar: getSidebarRouter(),
lastUpdatedText: "最后更新时间",
},
},
"en-US": {
label: "English",
lang: "en-US",
themeConfig: {
nav: getNavRouter("/en-US/"),
sidebar: getSidebarRouter("/en-US/"),
},
},
},
themeConfig: {
// common stuff goes here:
algolia: {
apiKey: "aea12a0a4281c855b5d23789e868f378",
indexName: "interview-questions-record",
appId: "XQYLP2L9WC",
},
socialLinks: [
{
icon: "github",
link: "https://github.com/ChaiMayor/hview-ui",
},
],
outline: [1, 3],
// you might wanna override these at locales instead like lastUpdatedText:
outlineTitle: "CONTENTS",
footer: {
message: "Released under the MIT License.",
copyright: "Copyright © 2023-present 芜湖起飞",
},
},
// base, head, lastUpdated, markdown, hooks, etc ...
}); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
click before


click after
Now that you are switching routes directly, how can you switch only the previous language prefix without affecting the existing route.
I wish someone could help me out. It's been stuck for hours😭.
My themeConfig configuration:
Beta Was this translation helpful? Give feedback.
All reactions