-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Integrations] How to translate the docs? #770
Comments
We should start adding i18n to it very soon |
@atinux looking forward to this feature. edit: I'm offering a bounty of |
@jaonoctus |
Yessir @NftTopBest |
wow, after some hours of research, find out that maybe need to modify the code in https://github.com/nuxt/content/blob/main/src/runtime/plugins/documentDriven.ts#L79 For now I success to make a global middleware to detect the locale from the URL (eg: /en/getting-start or /zh/getter-start) to.meta.documentDriven = {
page: {
_path: to.path,
_locale: 'en'
},
navigation: true
} can trigger the page query the correct locale content |
This is very clever @NftTopBest Maybe you can open a PR to Nuxt Content itself? |
@NftTopBest ; still interested in landing a PR? Or maybe just a documentation page explaining your setup? I would happily integrate this in our roadmap. |
Any progress on the topic or some way to make it work? |
Ok, I will do that! |
ya!! I was just busy on building my Nuxt Layer with web3 features! ;) I will start this issue recently! |
Hi @Tahul , I just add the PR here: nuxt/content#2075 Now we can just simply add the config in https://github.com/NftTopBest/nuxt-content/blob/564d21ea9090e6a18eb8a3153575c865681b62de/playground/i18n/nuxt.config.ts#L10-L11 You can checkout the i18n example here: https://github.com/NftTopBest/nuxt-content/tree/564d21ea9090e6a18eb8a3153575c865681b62de/playground/i18n But, it still has a bug that I don't find out the solution, anyone can help? |
Any progress on this? Right now I'm duplicating some components just to be able to translate some text. Thanks. |
bump |
Does Docus provide i18n or anything else to translate the docs into other languages? What about translating texts of theme, like
![image](https://user-images.githubusercontent.com/60849894/213778249-a9ab527d-ef65-4608-ba4f-f97ec4b85052.png)
Table of contents
shown in the image shown below?The text was updated successfully, but these errors were encountered: