google-translate-api icon indicating copy to clipboard operation
google-translate-api copied to clipboard

Google translate in angular 5 not working

Open akshayseth opened this issue 7 years ago • 2 comments

I want to add multi language support in my website.However most of the data is coming from API so I cant make a JSON of it. I am using Google Translate but it is not working. Can you please share steps as how to inject it in my angular 5 application? Much thanks in advance :)

akshayseth avatar Feb 21 '18 05:02 akshayseth

I tried doing this on my own and I'm getting some errors...

ERROR in ./node_modules/got/index.js Module not found: Error: Can't resolve './package' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\got' ERROR in ./node_modules/osenv/osenv.js Module not found: Error: Can't resolve 'child_process' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\osenv' ERROR in ./node_modules/graceful-fs/polyfills.js Module not found: Error: Can't resolve 'constants' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\graceful-fs' ERROR in ./node_modules/graceful-fs/graceful-fs.js Module not found: Error: Can't resolve 'fs' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\graceful-fs' ERROR in ./node_modules/mkdirp/index.js Module not found: Error: Can't resolve 'fs' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\mkdirp' ERROR in ./node_modules/got/index.js Module not found: Error: Can't resolve 'http' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\got' ERROR in ./node_modules/got/index.js Module not found: Error: Can't resolve 'https' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\got' ERROR in ./node_modules/os-homedir/index.js Module not found: Error: Can't resolve 'os' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\os-homedir' ERROR in ./node_modules/configstore/index.js Module not found: Error: Can't resolve 'path' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\configstore' ERROR in ./node_modules/mkdirp/index.js Module not found: Error: Can't resolve 'path' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\mkdirp' ERROR in ./node_modules/osenv/osenv.js Module not found: Error: Can't resolve 'path' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\osenv' ERROR in ./node_modules/xdg-basedir/index.js Module not found: Error: Can't resolve 'path' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\xdg-basedir' ERROR in ./node_modules/duplexer3/index.js Module not found: Error: Can't resolve 'stream' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\duplexer3' ERROR in ./node_modules/get-stream/buffer-stream.js Module not found: Error: Can't resolve 'stream' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\get-stream' ERROR in ./node_modules/got/index.js Module not found: Error: Can't resolve 'stream' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\got' ERROR in ./node_modules/graceful-fs/legacy-streams.js Module not found: Error: Can't resolve 'stream' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\graceful-fs' ERROR in ./node_modules/safe-eval/index.js Module not found: Error: Can't resolve 'vm' in 'C:\Users\round\Documents\machineTranslateSecondTry\node_modules\safe-eval' i 「wdm」: Failed to compile.

thavus avatar Nov 24 '18 22:11 thavus

@thavus can you describe the steps you took to use google-translate-api?

lloydaf avatar Nov 26 '18 07:11 lloydaf