= commited on
Commit
d046325
·
1 Parent(s): a06172d

fixed readme

Browse files
Files changed (1) hide show
  1. README.rst +5 -5
README.rst CHANGED
@@ -51,20 +51,20 @@ Usage
51
 
52
  .. code-block:: python
53
 
54
- from deep_translator import MyMemoryTranslator, PonsTranslator, LingueeTranslator
55
 
56
  english_text = 'happy coding'
57
 
58
- result_german = MyMemoryTranslator(source='auto', target='de').translate(payload=english_text)
59
 
60
  # Alternatively, you can pass languages by their name:
61
- translated = MyMemoryTranslator(source='english', target='german').translate(payload=english_text)
62
 
63
  # or maybe you want to translate a text file ?
64
- translated = MyMemoryTranslator(source='auto', target='german').translate_file('path/to/file')
65
 
66
  # or maybe you have many sentences in different languages and want to automate the translation process
67
- translated = MyMemoryTranslator(source='auto', target='de').translate_sentences(your_list_of_sentences)
68
 
69
 
70
  or maybe you would like to use the Pons translator: Pons.com
 
51
 
52
  .. code-block:: python
53
 
54
+ from deep_translator import GoogleTranslator, PonsTranslator, LingueeTranslator
55
 
56
  english_text = 'happy coding'
57
 
58
+ result_german = GoogleTranslator(source='auto', target='de').translate(payload=english_text)
59
 
60
  # Alternatively, you can pass languages by their name:
61
+ translated = GoogleTranslator(source='english', target='german').translate(payload=english_text)
62
 
63
  # or maybe you want to translate a text file ?
64
+ translated = GoogleTranslator(source='auto', target='german').translate_file('path/to/file')
65
 
66
  # or maybe you have many sentences in different languages and want to automate the translation process
67
+ translated = GoogleTranslator(source='auto', target='de').translate_sentences(your_list_of_sentences)
68
 
69
 
70
  or maybe you would like to use the Pons translator: Pons.com