Skip to content

Commit

Permalink
[readme] fixing mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
Animenosekai committed Jul 25, 2021
1 parent e10956a commit 45b1d41
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,18 @@ You can use each translators separately by using them the same way as you would
TranslationResult(service=Google, source=Hello World, source_language=eng, destination_language=jpn, result=こんにちは世界)
```

And some translators have their own parameters which can't be configured by the `Translator` class for now:
And some translators have their own parameters:

```python
>>> gtranslate_china = GoogleTranslate(service_url="translate.google.cn")
>>> gtranslate_china.translate("Hello World", "Japanese")
TranslationResult(service=Google, source=Hello World, source_language=eng, destination_language=jpn, result=こんにちは世界)

# it can even be used by translatepy.Translator
>>> from translatepy import Translator
>>> t = Translator([gtranslate_china])
>>> t.translate("Hello World", "Japanese")
TranslationResult(service=Google, source=Hello World, source_language=eng, destination_language=jpn, result=こんにちは世界)
```

#### The Language Class
Expand Down

0 comments on commit 45b1d41

Please sign in to comment.