use env to control the language of doc (#24) (#25)

This commit is contained in:
ver217 2021-11-15 16:53:56 +08:00 committed by GitHub
parent 9942fd5bfa
commit 2b05de4c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 24 deletions

View File

@ -24,6 +24,8 @@ author = 'HPC-AI Technology Inc.'
# The full version, including alpha/beta/rc tags # The full version, including alpha/beta/rc tags
release = '0.0.1' release = '0.0.1'
if 'SPHINX_LANG' in os.environ:
root_doc = f'index_{os.environ["SPHINX_LANG"]}'
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be # Add any Sphinx extension module names here, as strings. They can be

View File

@ -3,27 +3,27 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
夸父AI系统Colossal-AI开发文档 Colossal-AI documentation
====================================== ======================================
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:caption: 快速上手指南 :caption: GETTING STARTED
installation_zh.md installation.md
run_demo_zh.md run_demo.md
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:caption: 个性化您的训练 :caption: CUSTOMIZE YOUR TRAINING
parallelization_zh.md parallelization.md
model_zh.md model.md
trainer_engine_zh.md trainer_engine.md
amp_zh.md amp.md
zero_zh.md zero.md
add_your_parallel_zh.md add_your_parallel.md
config_zh.md config.md

View File

@ -3,27 +3,27 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Colossal-AI documentation 夸父AI系统Colossal-AI开发文档
====================================== ======================================
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:caption: GETTING STARTED :caption: 快速上手指南
installation.md installation_zh.md
run_demo.md run_demo_zh.md
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
:caption: CUSTOMIZE YOUR TRAINING :caption: 个性化您的训练
parallelization.md parallelization_zh.md
model.md model_zh.md
trainer_engine.md trainer_engine_zh.md
amp.md amp_zh.md
zero.md zero_zh.md
add_your_parallel.md add_your_parallel_zh.md
config.md config_zh.md