Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not translate while using it in gulpfile? #104

Open
kumaresan-subramani opened this issue Feb 3, 2020 · 2 comments
Open

can not translate while using it in gulpfile? #104

kumaresan-subramani opened this issue Feb 3, 2020 · 2 comments

Comments

@kumaresan-subramani
Copy link

below is my gulpfile:

const translate = require('google-translate-api');
gulp.task('check', function(){
    var cultureFile = fs.readFileSync('./locale.txt', 'utf8');
    translate(cultureFile, {from: 'en', to: 'zh-cn'}).then(res => {
        fs.writeFileSync('./check.txt',res.text,'utf8');
    }).catch(err => {
        console.error(err);
    });
});
@ZyC0R3
Copy link

ZyC0R3 commented Apr 25, 2020

Hi, take a look at this repo, https://github.com/vitalets/google-translate-api
its update to fix this issue,

Also i have a clone of the above repo and maintain it too,
https://github.com/ZyC0R3/google-translate-api

@kumaresan-subramani
Copy link
Author

HI @ZyC0R3 ,

Still it doesn't translate my text - refer below gulp task

https://github.com/kumaresan-subramani/gulp-translate/blob/master/gulpfile.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants