Skip to content

Commit

Permalink
fixed chinese translation
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhaloff committed Feb 12, 2021
1 parent 8121640 commit 21923f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deep_translator/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'ca': 'catalan',
'ceb': 'cebuano',
'ny': 'chichewa',
'zh': 'chinese (simplified)',
'zh': 'chinese',
'zh-cn': 'chinese (simplified)',
'zh-tw': 'chinese (traditional)',
'co': 'corsican',
Expand Down
5 changes: 2 additions & 3 deletions deep_translator/google_trans.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,5 @@ def translate_batch(self, batch=None):

if __name__ == '__main__':

txt =GoogleTranslator(source='en', target='en')#.translate('好的') # GoogleTranslator(source='hindi', target='en').translate(text="ghar jaana hai")
print("langs: ", txt._languages)
# print("text: ", txt)
txt =GoogleTranslator(source='zh', target='en').translate('好的') # GoogleTranslator(source='hindi', target='en').translate(text="ghar jaana hai")
print("text: ", txt)

0 comments on commit 21923f3

Please # to comment.