We are here to help you with “translate a WordPress theme with Poedit“. WordPress is a free and opensource content management system. So there are WordPress developers around the globe. That means many cultures, ideas, and languages.
Most of the developers prefer the English language for coding as it is widely accepted. On the other hand, there is a noticeable number of developers preferring their native language. Some common examples are Chinese, Japanese, greek, etc.
The final result of the coding is in the same language as coding. There are tens of thousands of themes in the WordPress market. Each having its unique properties and services.
We use those themes to enhance the workability and quality of our site. Now let us think that we are operating a website in Germany which means in german language. We need a theme for our website that gives output in English, but we need the German language. Now the problem is that the English language that we have in our WordPress dashboard.
Now You don’t need to worry we are here with the easy and simple steps to translate a WordPress theme with Poedit. The Step will help you to Work with WordPress Using your Own Language.
Steps to translate a WordPress theme with Poedit
- Set WordPress language and install Poedit
Developing a website and launching it using WordPress in any language can be done in easy three steps:
- Getting the language in CMS
- Translating theme-specific text and
- Adding content in the related language
The first thing we need to do is to add language on our website. This can be done in two different way
If our site is already up and running( English is used as language) then go to WordPress Dashboard>> Setting>> General. Just scroll down. You will get a drop-down menu to select different language simply another language. Just select the language you need and save the change. Now we will get our desired language like English to Espanol-Spanish.
You will get your desired language on your website. The step will lead your texts from WordPress core to your preferred language. You are free to install WordPress in a specific language while setting for the first time.
Once we install WP in related language the next step is to translate our theme. We can easily do it with the “Poedit” software. For that, we need to download the Poedit software and install it.
Edit theme language file
The theme language file can be edited. This step will help you to translate the English word to a different language. For example English word Comment to Spanish word comentario.
Install PO Editor and Make .PO and .MO file
Now, after activating the software you need to select the theme and translate all the default strings.
We just need to edit the theme language. Po file for a specific language. We can find the folder “Languages” inside the theme folder that we already have downloaded. When we download a theme form different theme provider we need to Unzip the compressed folder.
After we Unzip the folder we will get the folder where themes files will be there. Open the folder. You will get the files of the theme.
We will find a language file.Po and .mo extensions. Two different files for each different language. Now edit. Po files to translate the theme. The .mo files are not for us I mean for human editing. When we edit the PO file to Poedit, the MO file automatically gets some adjustments. Both PO and MO file is needed while uploading to the main server.
As we decided to change the English language to Spanish we will get the file for Spanish language es_ES.Po and es_ESmo. We need to open the es_ES.po file with Poedit software.
Now add comentario in the translation box on Poedit. # Using Google Translator. We are free to translate all the words using Poedit and save them.
- Upload PO & MO files on the site server
As we have added translations on language files locally. we need to upload these files to the live server to get the translation. Now we need to login to our site hosting server using an FTP program or cPanel.
Navigate public_html or www directory. GO to WP-Content\themes\theme-name\languages. Upload and replace the pair of language files. Since we are working for Spanish language, Upload those edited files to the server ( path:WP-Content\themes\theme-name\languages.) After this, we need to replace the existing file on the server with locally edited files.
After editing we need to refresh the posting page where the comment box is displayed. You will get your desired language.
The steps to translate a WordPress theme with Poedit completes here. I hope you got the steps and can follow it easily.
You are free to ask any questions regarding the topic. And if you are interested to have more such information them you can follow us. Don’t hesitate to comment us below if you have any further questions.