Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

May we cache result from Goole Translate API and show the cached result to our users?

When users visiting our website we use Google Translate API to translate our content to the user's language. (Of course we follow attribution and linking requirements so user knows that the content is a translation by Google.)

To optimize, we now want to cache the translations in our database, so we do not have to request Google Translate API everytime, but only once after the content changed.

May we do the caching?

And if Yes, Google Translate also gets improved and translation will not be the same after some months. So is there a limitation on how often the cache has to be refreshed? Or do we have to display a translation date?

Thank you

like image 588
Bulki S Maslom Avatar asked Oct 15 '22 07:10

Bulki S Maslom


1 Answers

As I understand it, you can cache translations for up to 15 days as long as the user initiated the translation request. So you cannot just cache these yourself on your server preemptively, but need to have someone visit the site first that initiates the request.

Here is some more info

like image 153
R. Kohlisch Avatar answered Oct 20 '22 00:10

R. Kohlisch