If you have already read our article on WordPress translation, you should be aware of the fact that you can translate your WordPress site to fit your needs and your visitors’ needs to almost any language you like. You can find the article by following this link: https://siliconthemes.com/how-to-change-default-wordpress-language/.
In that article, we explored what your options are when it comes to WordPress site translation. We also examined how you can change the Dashboard language as well as the front-end website language of your site. This would allow your visitors to read the menus and widgets in their mother language providing them a smoother experience. There is a drawback, however, when you translate your WordPress site using the methods mentioned in that article. You can only use ready-made translations of your site (made by others) without having any control on how some specific terms would appear.
The purpose of this article, however, is to provide you with more flexibility on how to translate your site. In fact, what you’re about to learn is how to create your own WordPress translations and customize entirely how your site will show to your readers. Yes, you’ve read it right! You will be able to create your 100% Custom Menus, your 100% genuine messages, your prompts, etc. To do this, you will need to know how to use a piece of software specifically designed for translation purposes; its name is POedit.
What on Earth is POedit? Why should I use it?
Simply put, POedit is an editor specialized in translating apps. Thus, you will have to use the POedit if you want to translate your WordPress site to the language of your selection. To get started, download this .powerful editor by visiting the following link: https://POedit.net/. After you download POedit, please install it to your computer.
OK! I’ve downloaded the POedit program, what’s next?
Here comes some theory. Don’t worry, we will try to make it as fast as .possible for you. Have you ever wondered how the WordPress Engine gets all the messages it needs to display content correctly? Well, everything WordPress needs exists in a special file, called a .po file (i.e. the language file of your WordPress Installation). This file contains all messages displayed by WordPress. Take a look at just a tiny part of it:
What we will do in this guide is to show you how you can change the way that WordPress displays each term using the language you desire. We will use the POedit program, of course.
Nice! Now that I know what a .PO file is, tell me how I can use it!
Before we delve into the details of the process, we will need to get a proper .po file for the language into which you desire to translate your site or some of its elements. To get the correct .po file, please follow the next steps:
Step 1: Log in to your WordPress Dashboard.
Step 2: Navigate to Settings > General and locate the Language menu.
Step 3: Pick your language or locale and click on the “Save Changes” button. For the purposes of this guide, we decided to translate our site from American English to British English as well as change some elements in our messages and menus.
Step 4: Connect to your server using an FTP client like Filezilla. (If you don’t know how to connect to your server using FTP, you can consult our guide on how to install a theme using FTP. It also shows how to use Filezilla to access your server and the contents of your site. You can find it here: https://siliconthemes.com/how-to-install-new-wordpress-theme-on-your-wordpress-site/ )
Step 5: Once you are logged into your server, locate the directory of your website and navigate to the WP-Content > languages folder. You should see two files called en_GB.mo and en_GB.po. Download them both to your computer (Right click and Download) to allow the POedit program to use them.
Step 6: Launch the POedit program. Click on the “Edit a Translation” button. On the popup window which now appears, browse your computer files and locate the .po file you’ve previously downloaded. When you’ve found the file, click on the “Open” button.
Step 7: You should now be able to see all the contents of the .po file. It should be a massive file, containing hundreds of terms. Now let’s sup.pose you don’t like the “Recent .posts” message on your widget area or anywhere else on your site. Let’s see how easy it is to change it using the POedit. Click Edit > Find to open the Find .pop-up window (you can press Ctrl and F simultaneously to do this as well). Type “Recent .posts” in the window that appears and locate the “Recent .posts” message. You might need to click on the “Next” button inside the pop-up window before you find the message. Now let’s sup.pose you want the message “Newest .posts” to appear instead of the message “Recent posts.” The only thing you need to do is type the message you want in the translation section, just like the following screenshot shows.
Step 8: Repeat the above process for the remaining terms you want to customize/ translate. You don’t have to translate all the terms that exist. Just change those which you don’t like.
Step 9: When you’re done translating, click “File > Save, ” and your translation file is ready.
Step 10: Upload the file you’ve just created to your server using FTP, and drop it inside the wp-content > languages directory. You will need to overwrite the existing one. That’s it. If you reload your site, all the terms you’ve changed in Step 8 will appear translated on your site. Congratulations! You now have a 100% custom- translated WordPress site.
BONUS TIP for the custom lovers.
If you wish to translate your WordPress site from scratch, without using predefined and pre-translated terms, you can create a brand new translation using the POedit. At the very first window of the program, just choose the “Create a new translation” option. Then, you have to provide the program with the relevant .po file (or a .pot template) to allow it get a template of the terms that your WordPress installation uses.
Finally, you can begin translating all the aspects of your WordPress site term by term. When you’re ready, save the results in a new .po file and upload it to your server. (If you decide to go down this road, please select the language you wish to translate your website into from your WordPress dashboard, then upload and overwrite the relevant .po file).
This concludes our guide on how to translate your WordPress site using the POedit program. You now know everything you will ever need to create 100% custom and localized WordPress sites without relying on the default translations that the WordPress community offer.
We hope you’ve enjoyed our guide! Have fun translating your sites!