wcodesoft / sentency-server

Server for the Sentency Project
MIT License
0 stars 0 forks source link

Localization Suggestion #10

Closed walterjgsp closed 3 years ago

walterjgsp commented 3 years ago

Feature

Suggest localization for a quote

Solution

Using GCP client the app will connect to the APIs using a service account and translate the text. It's also good to use Mongo to hold the value already translated to prevent the translation of the value again, that way we can create a small draft of the new quote, and after the quote is translated we can remove the whole collection on the Mongo side.

walterjgsp commented 3 years ago

We gonna add a new collection on Mongo to hold the translations that are already known so it's not necessary to call Google translation API all the time. The flow will be the following:

  1. Check Mongo for the translation of the quote you want
  2. If a quote already exists return it
  3. If not call Google translation API
  4. Save the returned translation into the Mongo DB collection.