A free and unlimited API for Google Translate :dollar: :no_entry_sign:
Initially my function was working fine. However, after a day when I ran the same function again without introducing any new changes, I am suddenly getting the error: "[TypeError: Cannot read property 'match' of undefined]". Here is my function: ```typescript const translateText = async (text: string, destLanguage: string) => { try { const translation = await translate(text, { to: destLanguage }); console.log('Translated text: ', translation.text); } catch (error) { console.log(error) } } ``` And I am calling the function like this: `translateText('Hello World', 'fr');` Can any one please help out what is happening since the error is not providing any clue at all as to from where it is originating. However, for context this line fails to execute in the above function: `const translation = await translate(text, { to: destLanguage });` so it seems like library is causing issue. Please help.
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be resolved. The issue was opened by raahimkhan and has received 3 comments.