mouuff / mtranslate

A simple api for google translate
MIT License
286 stars 83 forks source link

Handle the translate for the input characters more than 5000 #25

Open venkatesh1007prasath opened 1 year ago

venkatesh1007prasath commented 1 year ago

First, I appreciate the author and contributors for the great and cool work done here! Out of a curious experiment, I tried to translate srt file (Movie subtitle file). Tried to translate English to Tamil It is expected that the google translate will support the input up to 5000 characters, but the library could be

  1. enhanced to accept and handle the characters more than 5000 with internal split, process, append and return (or)
  2. can have a defensive approach with print statement about the acceptable string length and process the translate up to 5000 characters and return

Now the library is translating up to characters 5000 but if we tried to run more than 5000 (Even 5001), it returns None I can handle the limitations as per my requirement locally, but I am just notifying here