{"id":16641,"date":"2023-12-30T12:56:05","date_gmt":"2023-12-30T12:56:05","guid":{"rendered":"https:\/\/kevinbk.com\/?p=16641"},"modified":"2024-01-08T13:30:06","modified_gmt":"2024-01-08T13:30:06","slug":"como-integrar-o-gpt-ao-translatepress-e-outras-ferramentas-de-traducao","status":"publish","type":"post","link":"https:\/\/kevinbk.com\/en\/how-to-integrate-gpt-with-translatepress-and-other-translation-tools\/","title":{"rendered":"How to integrate GPT with TranslatePress and other translation tools"},"content":{"rendered":"
Most translation plugins for WordPress, such as Translatepress, Polylang, WPML, only use Google's API or another one to translate the websites, which makes the cost of translation extremely expensive. <\/p>\n\n\n\n
Open AI with GPT 3.5 turbo enabled translations that are a hundred times cheaper and more consistent. For example, while Google charges 20 USD for every 1,000,000 characters, OpenAI's GPT charges 0.0020 for every 800 words or about 5,000 characters. <\/p>\n\n\n\n
Using GPT 3.5, we spend less than 2 USD to translate 1,000,000 characters, making the use of translation API much cheaper and convenient. <\/p>\n\n\n\n
Previously it was necessary to bypass Google's API with new accounts or manually translate using a Database and Google Sheet, something that is usually complicated, laborious, and risky to have errors. <\/p>\n\n\n\n
In this article, I will share two ways to use GPT to translate your strings from Translatepress. One of the ways can be replicated in any translation plugin such as WPML and Polylang. <\/p>\n\n\n\n
Tired of waiting for Translatepress Support to natively integrate with GPT, I decided to create a remote integration using automation tools like Zapier or Make myself. <\/p>\n\n\n\n
The big problem is that my server only connects to the database via SSH Tunnel, so I couldn't use those two tools, but I resorted to the best option called N8N. <\/p>\n\n\n\n
This is an OpenSource that allows you to install your own automation system on your server, perfect for thousands of tasks. Thanks to this tool, I was able to connect to my database and create the automation. <\/p>\n\n\n\n
See below how I created this automation that can be further improved and customized to meet your needs, ignore strings, replace words, and make any other advanced changes to translations and databases on your WordPress. <\/p>\n\n\n