• Resolved omris83

    (@omris83)


    Hi

    If I use Translatepress and Google’s API, once a page has been translated is the data saved so it doesn’t have to do this each time? If not the charges from Google would be very high.

    I know manual translations are saved in a DB but what about automatic?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    The way the automatic translation feature works is a simple one. You can check this article to understand better: https://translatepress.com/automatically-translate-wordpress-site/
    
    We have documentation steps on how to set up the Google Translate API key and how to add quotas to never exceed a certain threshold:
    https://translatepress.com/docs/settings/generate-google-api-key/.
    Once the Google Translate API key is set into the plugin, it will translate each string on the pages accessed either by admin or visitors, without requiring any help from you.
    
    It will only translate content in one particular language on one particular page the first time someone views that page in that language.
    This means that there is no complete scanning and translating the entire site. It's only done incrementally as the pages are accessed.
    
    The translations are stored in your site's local database so that the next time a visitor accesses the same page, it doesn't need to query the Google API/DeepL API again for the same strings.
    This saves execution time and most importantly saves costs.
    
    When browsing a page normally, the content is translated only in the language that is being displayed.
    When browsing in Translation Editor, it's like browsing all the languages at the same time. Translations will be retrieved for all languages for the content being viewed in the Translation Editor.
    
    Translations are not based on a specific page. They are based on strings. The strings on the page are divided by HTML tags. So, for example, a paragraph inside a "p" tag is considered one individual string.
    
    This means that if a string is translated on a page (either by Google Translate, DeepL or human-reviewed), then the same string found on another page will already have a translation. For example, you only need to translate the Menu items once, and they will be translated across the website.
    
    You can edit any automatically translated string later, from the Translation Editor.
    
    TranslatePress does not create new posts for the translated versions of the original post. But the translated versions will have separate URLs.
    These translated URLs will contain the language but also a translated slug of the post if you plan to use the SEO Pack Add-on, https://translatepress.com/docs/addons/seo-pack/.

    Cheers,

    Thread Starter omris83

    (@omris83)

    Hi Dennis. Thank you for that detailed response. That’s great. In regards to your comments about DeepL. If you want to switch from Google’s API to DeepL, is it easy to clear the translations already saved and start again?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Google API Question’ is closed to new replies.