Localizing Helm Documentation
Contributions for translations use the same process as contributions for documentation. Translations are supplied through pull requests to the git repository and pull requests are reviewed by the team that manages the website.
Documentation is organized by the ISO 639-1 standard for the language codes. For example, the two-letter code for Korean is .
In content and configuration you will find the language code in use. Here are 3 examples:
- In the
content
directory the language codes are the subdirectories and the localized content for the language is in each directory. Primarily in thedocs
subdirectory of each language code directory. - In the top level
config.toml
file there is configuration for navigation and other details organized by language code.
English, with a language code of , is the default language and source for translations.
To contribute translations start by of the helm-www repository on GitHub. You will start by committing the changes to your fork.
By default your fork will be set to work on the default branch known as main
. Please use branches to develop your changes and create pull requests. If you are unfamiliar with branches you can .
Once you have a branch make changes to add translations and localize the content to a language.
When you are ready, create a pull request with the translation back to the helm-www repository.
Once a pull request has been created one of the maintainers will review it. Details on that process are in the file.
Localizing all of the Helm content is a large task. It is ok to start small. The translations can be expanded over time.
When starting a new language there is a minimum needed. This includes:
- Adding a
content/[LANG]/docs
directory containing an_index.md
file. This is the top level documentation landing page. - Creating a
[LANG].toml
file in the directory. Initially you can copy theen.toml
file as a starting point. - Adding a section for the language to the
config.toml
file to expose the new language. An existing language section can serve as a starting point.
Translated content needs to reside in the content/[LANG]/docs
directory. It should have the same URL as the English source. For example, to translate the intro into Korean it can be useful to copy the english source like:
The content in the new file can then be translated into the other language.
Do not add an untranslated copy of an English file to content/[LANG]/
. Once a language exists on the site, any untranslated pages will redirect to English automatically. Translation takes time, and you always want to be translating the most current version of the docs, not an outdated fork.
Note, translation tools can help with the process. This includes machine generated translations. Machine generated translations should be edited or otherwise reviewing for grammar and meaning by a native language speaker before publishing.
The site global config.toml file is where language navigation is configured.
To add a new language, add a new set of parameters using the defined above. Example:
Translated content will sometimes include links to pages that only exist in another language. This will result in site build errors. Example:
To resolve this, you need to check your content for internal links.
- internal page links need to be fixed
For internal pages that do not exist (or have not been translated yet), the site will not build until a correction is made. As a fallback, the url can point to another language where that content does exist as follows:
See the for more info.