title: google-translate-api in an Angular 2
body: <p>I would like to play with the (free) google-translate-api in an Angular 4 app and it's not at all obvious to me how to import, inject and use this. I am fairly new to Angular so I'm sure that is part of the problem. I have seen the docs at <a href="https://www.npmjs.com/package/google-translate-api" rel="nofollow noreferrer">https://www.npmjs.com/package/google-translate-api</a>, but I don't know how to use it in Angular 4.what I do install google-transalte-api</p>
  
  <p>In my AppComponent.ts</p>
  
  <pre><code>constructor(private translate: Translate,private _http: Http ){
  translate('Ik spreek Engels', {to: 'en'}).then(res =&gt; {       
  console.log(res);
  //=&gt; I speak English
  console.log(res.from.language);
  //=&gt; nl
  })
  }
  </code></pre>
  
  <p><strong>Errors:</strong></p>
  
  <pre><code>ERROR in ./~/graceful-fs/graceful-fs.js
  Module not found: Error: Can't resolve 'fs' in 'D:\jboss-eap-
  6.2\standalone\deployments\geniush5.ear\copl.war\node_modules\graceful-fs'
  @ ./~/graceful-fs/graceful-fs.js 1:9-22
  @ ./~/configstore/index.js
  @ ./~/google-translate-token/index.js
  @ ./~/google-translate-api/index.js
  @ ./app/component/customer/controller/CustomerController.ts
  @ ./app/app.ts
  
  ERROR in ./~/mkdirp/index.js 
  Module not found: Error: Can't resolve 'fs' in 'D:\jboss-eap-
  6.2\standalone\deployments\geniush5.ear\copl.war\node_modules\mkdirp'
  @ ./~/mkdirp/index.js 2:9-22
  @ ./~/configstore/index.js
  @ ./~/google-translate-token/index.js
  @ ./~/google-translate-api/index.js
  @ ./app/component/customer/controller/CustomerController.ts
  @ ./app/app.ts
  
  ERROR in ./~/osenv/osenv.js
  Module not found: Error: Can't resolve 'child_process' in 'D:\jboss-eap-
  6.2\standalone\deployments\geniush5.ear\copl.war\node_modules\osenv'
  @ ./~/osenv/osenv.js 3:11-35
  @ ./~/configstore/index.js
  @ ./~/google-translate-token/index.js
  @ ./~/google-translate-api/index.js
  @ ./app/component/customer/controller/CustomerController.ts
  @ ./app/app.ts
  </code></pre>
  
  <p>help should be appreciated.</p>