]> granicus.if.org Git - esp-idf/commitdiff
docs: add language link to easily change to Chinese version
authorMichael (Xiao Xufeng) <xiaoxufeng@espressif.com>
Wed, 14 Mar 2018 09:03:56 +0000 (17:03 +0800)
committermichael <xiaoxufeng@espressif.com>
Mon, 21 May 2018 02:30:12 +0000 (10:30 +0800)
docs/_static/choose_version.png [new file with mode: 0644]
docs/en/index.rst
docs/en/languages.rst [new file with mode: 0644]
docs/zh_CN/index.rst
docs/zh_CN/languages.rst [new file with mode: 0644]

diff --git a/docs/_static/choose_version.png b/docs/_static/choose_version.png
new file mode 100644 (file)
index 0000000..c8927df
Binary files /dev/null and b/docs/_static/choose_version.png differ
index 681d526d46bd03c676f087bfa207be18d89f8ea1..80079de3db64154e28c619b650f0004911e30d1b 100644 (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`
diff --git a/docs/en/languages.rst b/docs/en/languages.rst
new file mode 100644 (file)
index 0000000..b50c8c9
--- /dev/null
@@ -0,0 +1,19 @@
+Switch Between Languages/切换语言\r
+=================================\r
+\r
+The documentation now has two language versions, however, please refer to the English version if there is any discrepancy.\r
+\r
+本文档现在有两种语言的版本,如有出入请以英文版本为准。\r
+\r
+- English/英文\r
+- Chinese/中文\r
+\r
+You can easily changed from one language to another by the panel on the sidebar like below. Just click on the **Read\r
+the Docs** title button on the left-bottom conner if it is folded.\r
+\r
+如下图所示,你可使用边栏的面板进行语言的切换。如果该面板被折叠,点击左下角 **Read the Docs** 标题按钮来显示它。\r
+\r
+.. image:: /../_static/choose_version.png\r
+\r
+\r
+\r
index 4b773da8adb86f9427dd6801d8d61930b9b5ac5c..9945da9bc5f677ac41c6bb34c8c28d3087f10e6e 100644 (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`
diff --git a/docs/zh_CN/languages.rst b/docs/zh_CN/languages.rst
new file mode 100644 (file)
index 0000000..50879c5
--- /dev/null
@@ -0,0 +1 @@
+.. include:: ../en/languages.rst\r