Bryant Makes Programs
Bryant Makes Programs

Reputation: 1694

Implementing Google Translate In A Gulp AngularJS Application

I'm trying to find some information about how Google Translate works with an AngularJS web application. A little background information:

My concern really stems from the following:

Much of the content they want translated is user generated, so having translations created for each piece of text is not realistic.

Their current product was never intended for international audiences, so anything beyond Google Translate is going to be a decent sized retrofit.

Thoughts?

Upvotes: 1

Views: 527

Answers (1)

dpix
dpix

Reputation: 3103

If you are using angular, or any other front end framework it would be simpler to use google's translate api directly.

After you fetch the content and before being rendered by the component you would want to async call their api and map the results.

Either that, or you could write a filter in angularjs to do the translating too, but you might end up with some jank as the text would change after render

https://docs.angularjs.org/api/ng/filter/filter

See: https://cloud.google.com/translate/docs/quickstart-client-libraries

Upvotes: 2

Related Questions