Merge pull request #99 from krs131099/master
Browse filesUpdated Importing syntax in code-blocks README.rst
- docs/README.rst +7 -7
docs/README.rst
CHANGED
|
@@ -135,14 +135,14 @@ Quick Start
|
|
| 135 |
|
| 136 |
.. code-block:: python
|
| 137 |
|
| 138 |
-
from
|
| 139 |
translated = GoogleTranslator(source='auto', target='de').translate("keep it up, you are awesome") # output -> Weiter so, du bist großartig
|
| 140 |
|
| 141 |
or using proxies:
|
| 142 |
|
| 143 |
.. code-block:: python
|
| 144 |
|
| 145 |
-
from
|
| 146 |
|
| 147 |
proxies_example = {
|
| 148 |
"https": "34.195.196.27:8080",
|
|
@@ -156,7 +156,7 @@ or even directly from terminal:
|
|
| 156 |
.. code-block:: console
|
| 157 |
|
| 158 |
$ deep-translator translate -src "en" -tgt "de" -txt "keep it up, you are awesome"
|
| 159 |
-
|
| 160 |
|
| 161 |
=====
|
| 162 |
Usage
|
|
@@ -175,7 +175,7 @@ Imports
|
|
| 175 |
|
| 176 |
.. code-block:: python
|
| 177 |
|
| 178 |
-
from
|
| 179 |
MicrosoftTranslator,
|
| 180 |
PonsTranslator,
|
| 181 |
LingueeTranslator,
|
|
@@ -536,7 +536,7 @@ can be used with all supported translators.
|
|
| 536 |
|
| 537 |
.. code-block:: python
|
| 538 |
|
| 539 |
-
from
|
| 540 |
|
| 541 |
# define your proxy configs:
|
| 542 |
proxies_example = {
|
|
@@ -567,13 +567,13 @@ To translate a string or line of text:
|
|
| 567 |
|
| 568 |
.. code-block:: console
|
| 569 |
|
| 570 |
-
$
|
| 571 |
|
| 572 |
Alternate short option names, along with using language abbreviations:
|
| 573 |
|
| 574 |
.. code-block:: console
|
| 575 |
|
| 576 |
-
$
|
| 577 |
|
| 578 |
|
| 579 |
Finally, to retrieve a list of available languages for a given translator:
|
|
|
|
| 135 |
|
| 136 |
.. code-block:: python
|
| 137 |
|
| 138 |
+
from deep_translator import GoogleTranslator
|
| 139 |
translated = GoogleTranslator(source='auto', target='de').translate("keep it up, you are awesome") # output -> Weiter so, du bist großartig
|
| 140 |
|
| 141 |
or using proxies:
|
| 142 |
|
| 143 |
.. code-block:: python
|
| 144 |
|
| 145 |
+
from deep_translator import GoogleTranslator
|
| 146 |
|
| 147 |
proxies_example = {
|
| 148 |
"https": "34.195.196.27:8080",
|
|
|
|
| 156 |
.. code-block:: console
|
| 157 |
|
| 158 |
$ deep-translator translate -src "en" -tgt "de" -txt "keep it up, you are awesome"
|
| 159 |
+
|
| 160 |
|
| 161 |
=====
|
| 162 |
Usage
|
|
|
|
| 175 |
|
| 176 |
.. code-block:: python
|
| 177 |
|
| 178 |
+
from deep_translator import (GoogleTranslator,
|
| 179 |
MicrosoftTranslator,
|
| 180 |
PonsTranslator,
|
| 181 |
LingueeTranslator,
|
|
|
|
| 536 |
|
| 537 |
.. code-block:: python
|
| 538 |
|
| 539 |
+
from deep_translator import GoogleTranslator
|
| 540 |
|
| 541 |
# define your proxy configs:
|
| 542 |
proxies_example = {
|
|
|
|
| 567 |
|
| 568 |
.. code-block:: console
|
| 569 |
|
| 570 |
+
$ deep_translator google --source "english" --target "german" --text "happy coding"
|
| 571 |
|
| 572 |
Alternate short option names, along with using language abbreviations:
|
| 573 |
|
| 574 |
.. code-block:: console
|
| 575 |
|
| 576 |
+
$ deep_translator google -src "en" -tgt "de" -txt "happy coding"
|
| 577 |
|
| 578 |
|
| 579 |
Finally, to retrieve a list of available languages for a given translator:
|