I am very glad to hear from you.
But I don’t agree with using translation plug-ins because of vuepress
supports multiple languages.
I think we should arrange the files under src/guide
in the following like this:
src/guide
├─advanced
├─basics
├─best-practices
├─deployment
├─how-to
└─zh # Chinese document folder
├─advanced
├─basics
├─best-practices
├─deployment
└─how-to
I will translate these documents and place them as new files in src/guide/zh
folder
After that, we just need to modify .vuepress/config.js
to add some config in sidebar
:
sidebar: {
"/guide/zh/": [{
title: "概览",
sidebarDepth: 1,
children: ["/guide/zh/", "/guide/zh/getting-started.md"],
},
...
],
"/guide/": [{
title: "General",
sidebarDepth: 1,
children: ["/guide/", "/guide/getting-started.md"],
},
...
]
}
Maybe you will ask what to do if the document is updated. Don’t worry. I think that since we are going to make a formal document, this document will definitely not be changed frequently. It is enough for me to modify it manually with minor changes.
Why should I insist on this deployment?
Because I think if you use translation plug-in, what’s the difference between it and Google Translation?
In order to ensure the accuracy of expressing meaning and the fluency of documents,
I think it’s better to support multiple languages in my way.
What do you think?
I just thought about it carefully, maybe I misunderstood what you said.
I have always thought that you want to implement localization operations by using third-party translation plugins, but after I carefully figured it out, I think you are referring to the use of vuepress
to implement multilingual sites.
I am sorry that I said the above without thinking carefully.
Let’s implement sanic’s multi-language support together. Come on!
Now I have completed the multilingual support of menu and homepage, and I am still translating the document part. When I finish translating, I will do PR operation.