diff --git a/deep_translator/google.py b/deep_translator/google.py index d14d4b3..67fae8a 100644 --- a/deep_translator/google.py +++ b/deep_translator/google.py @@ -119,4 +119,9 @@ def translate_batch(self, batch: List[str], **kwargs) -> List[str]: @param batch: list of texts you want to translate @return: list of translations """ - return self._translate_batch(batch, **kwargs) + if not batch: + raise Exception("Enter your text list that you want to translate") + text = '\n'.join(batch) + translated = self.translate(text, **kwargs) + arr = translated.split('\n') + return arr