From a7d34dc1cfee501f4a814a5405a8044c192e9b6c Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Thu, 4 Mar 2021 17:13:05 -0800 Subject: [PATCH] Add info on translations --- .../en/contributing/contributing-docs.md | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) 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