{"id":2550,"date":"2021-01-27T16:47:51","date_gmt":"2021-01-27T16:47:51","guid":{"rendered":"http:\/\/kevinbk.com\/\/?p=2550"},"modified":"2023-09-28T09:53:44","modified_gmt":"2023-09-28T09:53:44","slug":"como-eu-traduzi-meu-site-com-translatepress","status":"publish","type":"post","link":"https:\/\/kevinbk.com\/en\/how-i-translated-my-site-with-translatepress\/","title":{"rendered":"How did I translate my website with Translatepress?"},"content":{"rendered":"

Having a website in multiple languages \u200b\u200bis important if you want to reach a larger audience and have higher earnings on Adsense. Thinking about it for years I tried to find practical ways to translate my website, until I finally reached a verdict. <\/p>\n\n\n\n

First translation experience with Polylang <\/h2>\n\n\n\n

Most people I know recommend using WPML, I even bought a license, but I had a bad experience and ended up asking for a refund and using the free Polylang option. <\/p>\n\n\n\n

Polylang at no cost allows you to manage a website in multiple languages \u200b\u200band with translated URLs. Unfortunately things have to be done manually. I even translated some articles using the Lingotek extension with free API, but because of some problems I preferred to resort to manual translation with Google Translate. <\/p>\n\n\n\n

I arrived over 2 years to translate more than 130 articles in English and 60 articles in Spanish. I got about 50,000 organic monthly visits to the Spanish and English pages, so there came a time that I thought about expanding even more. <\/p>\n\n\n\n

Unfortunately it is not practical to translate using Google Translate article by article, I also did not like the fact that polylang mixes translated articles in the same data table as wp-posts<\/strong><\/em>; <\/p>\n\n\n\n

\"Como<\/figure><\/div>\n\n\n\n

Looking for alternatives for machine translation \u2013 GTranslate<\/h2>\n\n\n\n

In the middle of creating a song lyrics site, want a plugin that allows you to automatically translate my entire site into multiple languages. Among all the alternatives I found in the recommendation articles, I ignored Weglot and Translatepress and ended up being attracted by GTranslate. <\/p>\n\n\n\n

GTranslate seems to be incredible, as it does not store data on your server or database, but on their own HOST and CDN. Another interesting factor is that they automatically translate all articles into more than 40 languages \u200b\u200bwith URL and SEO. <\/p>\n\n\n\n

I'm talking about the paid version, since its free version is worthless to SEO. The big problem is that your monthly installments are salty. The translated link plan costs $ 27 a month. I didn't see any problems, since there are thousands of pages being hosted on their server. He had faith that foreign visits would generate $ 27 a day.<\/p>\n\n\n\n

In just one day using paid GTranslate, more than 90,000 pages in other languages \u200b\u200bwere generated, but I had a problem that disappointed me, the cache plugin ended up breaking the translated sites because of the dynamic minification URL. <\/p>\n\n\n\n

\"Como<\/figure><\/div>\n\n\n\n

Leaving GTranslate and getting to know TranslatePress <\/h2>\n\n\n\n

I started to get irritated and went back to searching for alternatives, I ended up paying attention to Translatepress. Initially he did not attract me because of the need to use API for automatic translation that is usually paid for. The translation also seems to be complex, since you translate blocks and strings instead of copying and translating an entire article as in polylang. <\/p>\n\n\n\n

I started thinking about the annual expenses with GTranslate that exceeds 279 dollars, against Translatepress 80 dollars a year, being able to get a license of 130 dollars to use in up to 3 sites in the future. I came to the conclusion that it was not worth paying eternally for GTranslate with the possibility of losing all translation if I stop paying the subscription or the company goes bankrupt. <\/p>\n\n\n\n

So I ended up migrating to TranslatePress and in one day I translated all 1800 articles into English using the Google Translate API which is very accurate and uses neural translation. Unfortunately the $ 300 earned from Google is over, I wasn\u2019t looking to pay $ 90 for just one million translated characters. <\/p>\n\n\n\n

How did I translate with Translatepress without a Translation API? <\/h2>\n\n\n\n

I had already added more than 10 languages \u200b\u200bbefore I even finished translating one. I thought about deleting it to prevent pages in Portuguese from being displayed in other languages, but I was afraid to negatively affect SEO.<\/p>\n\n\n\n

One of the things I liked about TranslatePress is the fact that they use a table for each language in the database. This gave me an idea, I took the tables of all languages \u200b\u200band found that I can translate them quickly. <\/p>\n\n\n\n

It is not a simple process, but it is better than translating article by article, block by block. I created a local MySQL server and copied the tables I wanted to translate to the local server (it is faster). <\/p>\n\n\n\n

\"Como<\/figure><\/div>\n\n\n\n

On the local server I filtered the lines I didn't want to translate and copied over 10,000 lines of the original text, pasted it into an excel column and used the google translator for documents (no character limits) and quickly translated 10,000 lines of strings in minutes . <\/p>\n\n\n\n

Because it has about 2000 articles in the original language, each language table contains about 250,000 rows, so it was a long process, but there were moments when I translated 25,000 rows from the database into just one excel file. <\/p>\n\n\n\n

You just need to be careful that no characters, formatting or line breaks change the number of lines when copying and pasting in excel. Every time I copied and pasted something from the database to Excel, I checked the number of rows. <\/p>\n\n\n\n

\"Como<\/figure><\/div>\n\n\n\n

Each item you copy, translate and paste from the column original<\/strong><\/em> for translated<\/em><\/strong>, you need to change the column number status<\/em><\/strong> for 2<\/strong>, thus preventing the automatic translation of Translatepress from re-translating that line. <\/p>\n\n\n\n

One of the advantages of translating directly from the database is to avoid spending on characters from the Google Translation API or Deepl. Since my site has a lot of English characters, thousands of lines I just had to copy and paste into the column translated<\/em><\/strong>. <\/p>\n\n\n\n

I used Navicat to edit the databases in a grid, I tried with dbeaver<\/strong><\/em>, but due to lack of knowledge I was unable to page or use the filters in the database. Filters are important to help you find texts that do not need to be translated, that can be simply copied and pasted into the table translated<\/strong><\/em>. <\/p>\n\n\n\n

I didn't want to install a MySQL server on my personal machine, so I used Docker to create the Localhost server, since editing directly from the site is very slow, especially for tables with more than 10,000 loaded rows. <\/p>\n\n\n\n

Bypassing the 5000 Google Translate Limits characters<\/h2>\n\n\n\n

I made a video showing how I edit the database and how I circumvent the translation limit, I hope you like the video showing step by step: <\/p>\n\n\n\n

\n