diff --git a/daprdocs/content/en/contributing/contributing-docs.md b/daprdocs/content/en/contributing/contributing-docs.md index ae8c6dfd7..3fa66cbe5 100644 --- a/daprdocs/content/en/contributing/contributing-docs.md +++ b/daprdocs/content/en/contributing/contributing-docs.md @@ -232,3 +232,32 @@ The shortcode would be: ### References - [Docsy authoring guide](https://www.docsy.dev/docs/adding-content/) + +## Translations + +The Dapr Docs supports adding language translations into the docs using git submodules and Hugo's built in language support. + +You can find an example PR of adding Chinese language support in [PR 1286](https://github.com/dapr/docs/pull/1286). + +Steps to add a language: +- Open an issue in the Docs repo requesting to create a new language-specific docs repo +- Once created, create a git submodule within the docs repo: + ```sh + git submodule add translations/ + ``` +- Add a language entry within `daprdocs/config.toml`: + ```toml + [languages.] + title = "Dapr Docs" + weight = 3 + contentDir = "content/" + languageName = "" + ``` +- Create a mount within `daprdocs/config.toml`: + ```toml + [[module.mounts]] + source = "../translations/docs-/content/" + target = "content" + lang = "" + ``` +- Repeat above step as necessary for all other translation directories \ No newline at end of file