docs: add language link to easily change to Chinese version

This commit is contained in:
Michael (Xiao Xufeng) 2018-03-14 17:03:56 +08:00 committed by michael
parent d754b53ae2
commit 2852dd37fb
5 changed files with 29 additions and 0 deletions

BIN
docs/_static/choose_version.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -1,8 +1,11 @@
ESP-IDF Programming Guide
=========================
:link_to_translation:`zh_CN:[中文]`
This is the documentation for Espressif IoT Development Framework (`esp-idf <https://github.com/espressif/esp-idf>`_). ESP-IDF is the official development framework for the `ESP32 <https://espressif.com/en/products/hardware/esp32/overview>`_ chip.
The documentation has different language versions (:link_to_translation:`en:English`, :link_to_translation:`zh_CN:中文版`, :doc:`How to switch between languages? <languages>`). However, please refer to the English version if there is any discrepancy.
================== ================== ==================
|Get Started|_ |API Reference|_ |H/W Reference|_
------------------ ------------------ ------------------
@ -44,5 +47,6 @@ This is the documentation for Espressif IoT Development Framework (`esp-idf <htt
Resources <resources>
Copyrights <COPYRIGHT>
About <about>
[语言/Languages] <languages>
* :ref:`genindex`

19
docs/en/languages.rst Normal file
View file

@ -0,0 +1,19 @@
Switch Between Languages/切换语言
=================================
The documentation now has two language versions, however, please refer to the English version if there is any discrepancy.
本文档现在有两种语言的版本,如有出入请以英文版本为准。
- English/英文
- Chinese/中文
You can easily changed from one language to another by the panel on the sidebar like below. Just click on the **Read
the Docs** title button on the left-bottom conner if it is folded.
如下图所示,你可使用边栏的面板进行语言的切换。如果该面板被折叠,点击左下角 **Read the Docs** 标题按钮来显示它。
.. image:: /../_static/choose_version.png

View file

@ -1,8 +1,11 @@
ESP-IDF 编程指南
=========================
:link_to_translation:`en:[English]`
这是乐鑫 IoT 开发开发框架 (`esp-idf <https://github.com/espressif/esp-idf>`_) 的文档. ESP-IDF 是 `ESP32 <https://www.espressif.com/zh-hans/products/hardware/esp32/overview>`_ 芯片的官方开发框架.
本文档提供不同语言的翻译版本 (:link_to_translation:`en:English`, :link_to_translation:`zh_CN:中文版`, :doc:`如何切换语言? <languages>`), 如有出入请以英文版本为准。
================== ================== ==================
|快速入门|_ |API 参考|_ |H/W 参考|_
------------------ ------------------ ------------------
@ -44,5 +47,7 @@ ESP-IDF 编程指南
相关资源 <resources>
版权 <COPYRIGHT>
关于 <about>
[Languages/语言] <languages>
* :ref:`genindex`

1
docs/zh_CN/languages.rst Normal file
View file

@ -0,0 +1 @@
.. include:: ../en/languages.rst