Are you a native speaker of a language other than English? We'd love to have your help!
(Read the contribution guidelines first for general information about contributing to this project.)
If the docs are not available in your language yet and you would like to translate them, you can do so by following these steps:
-
Copy the
pages/en
directory to a new directory with the name of your language, e.g.pages/de
for German. (If you're not sure what the language code is, you can find it here.) -
File a draft PR to let others know you're working on it. This is to avoid duplicate work, and also allows for community feedback along the way.
-
File by file, translate the content of the files.
-
Update the
lang
attribute in the frontmatter of the files translated to your language. If there are any files you haven't translated yet, that's fine. Just leave thelang: en
attribute in the frontmatter. -
If the language you are translating into is read right-to-left (for example, Arabic or Hebrew), also add
dir: rtl
to the frontmatter. -
Add your language to the
KNOWN_LANGUAGE
object in config.ts. You'll now get some type errors on theSIDEBAR
andSIDEBAR_HEADER_MAP
objects in the same file. Follow the instructions in the comments and translate the requested entries. -
When you're done, mark the pull request as ready for review.
We aim to have 1-2 reviews on each PR before merging. This allows for some back and forth and ensures that the quality of the docs is high, and the tone is consistent.
We'd highly appreciate it if you knew someone who speaks the language you're translating into to review your PR. This can help speed up the process of getting your contribution merged.
Naturally, the English docs will move faster than the translated ones. We've implemented a feature that alerts visitors if a translated version of a page is outdated. If you see that a page is outdated and you're able to update it, please do so!
We also have code owners for each language. Being a code owner means that you get notified when there is a PR that includes changes to the files of your language, so that you can review it.
Becoming a code owner is open to anyone who has contributed to a language, either by writing translations themselves or by reviewing those of others. If would like to become a code owner, either add your GitHub username to your language in translations.yml or let us know in the create-t3-translation
channel on Discord.