google-translate-api
google-translate-api copied to clipboard
Text Limit with English characters
I found that using this package, the text limit is around 1500 characters. is it because it is using GET request instead of POST ? As i am expecting a 5000 characters limit.
Thanks
I also think it is using GET request instead of POST。
In my case, I found the author use 'got' module. So I change the index.js file to convert GET => POST.
Here is my change:
`
...
var data = {
client: 't',
sl: opts.from,
tl: opts.to,
hl: opts.to,
dt: ['at', 'bd', 'ex', 'ld', 'md', 'qca', 'rw', 'rm', 'ss', 't'],
ie: 'UTF-8',
oe: 'UTF-8',
otf: 1,
ssel: 0,
tsel: 0,
kc: 7,
// q: text
};
data[token.name] = token.value;
//return url + '?' + querystring.stringify(data);
//}).then(function (url) {
return got(url+'?'+querystring.stringify(data),
{method:'POST',
query:querystring.stringify(text)}
).then(function (res) {
... ` Hope it will work fine with you.