VitePress Lang - i18n localization package for the default theme #5192
rozsazoltan
started this conversation in
Show and tell
Replies: 0 comments
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.
Many internal documentation sites are built with VitePress. In many cases, the visual design is not the main priority, so teams reuse the default theme texts again and again.
Besides English, many projects also maintain their documentation in their native language or in other languages. In those cases, translating every single theme component becomes yet another duplicated effort - one that at least one other developer has probably already done before you.
After maintaining several similar documentation projects, I created vitepress-lang, a package that aims to provide native localization support for as many languages as possible for the VitePress default theme.
If you are looking for i18n support for VitePress and want the fixed default theme texts translated into your own language, this package lets you implement that easily.
Create a VitePress project:
Install
vitepress-lang:Use
defineLangConfig()inside.vitepress/config.tsto create translated VitePress locale configs.Wrap your config with
withLangSearch()to automatically register local search, Algolia search, and Ask AI translations for every configured locale.All reactions