ドキュメントの多言語化

注釈

This feature only applies to Sphinx documentation. We are working to bring it to our other documentation backends.

Read the Docsではあなたのドキュメントを複数の言語で提供できます。以下の2つをサポートしています。

  • 他の言語で書かれたプロジェクト
  • 複数の言語に翻訳されているプロジェクト

別の言語で書かれたプロジェクト

It is easy to set the Language of your project. On the project Admin page (or Import page), simply select your desired Language from the dropdown. This will tell Read the Docs that your project is in the language. The language will be represented in the URL for your project.

For example, a project that is in Spanish will have a default URL of /es/latest/ instead of /en/latest/.

注釈

You must commit the .po files for Read the Docs to translate your documentation.

複数の言語に翻訳されているプロジェクト

この場合少し複雑となります。一つの親プロジェクトと、プロジェクトの翻訳と印が付けられた複数のプロジェクトが必要になります。例として phpmyadmin を見てみます。

メインの phpmyadmin がすべての翻訳の親とします。また、それぞれの翻訳ごとにプロジェクトを作成します。例えば、 phpmyadmin-spanish です。 phpmyadmin-spanish言語スペイン語 に設定します。親プロジェクトの 翻訳 ページでは、 phpmyadmin-spanish がそのプロジェクトの翻訳であると設定します。

これにより以下のように提供されるようになります。

  • phpmyadmin at http://phpmyadmin.readthedocs.io/en/latest/
  • phpmyadmin-spanish at http://phpmyadmin.readthedocs.io/es/latest/

また、 Read the Docs の左下に各言語が表示されるようになります。

_images/translation_bar.png

注釈

The default language of a custom domain is determined by the language of the parent project that the domain was configured on. See Custom Domains for more information.

注釈

You can include multiple translations in the same repository, with same conf.py and .rst files, but each project must specify the language to build for those docs.

注釈

You can read Manage Translations to understand the whole process for a documentation with multiples languages in the same repository and how to keep the translations updated on time.