Translate Your WordPress Site

WordPress comes with an amount of great benefits. One of them is the simple fact is fully translated into over 65 languages, and it can be adjusted to your language’s characteristics as well. We know that this is important since your audience might be pretty narrow (e.g. Spanish natives).

If your website can be a good source of information for users that don’t know the main language, it’s a loss not to make it accessible for them too. If you invest a lot of time and energy to write valuable content, then you should also try to make it available as it can be. In the end, you want to share.

It’s good to know that having a multi-language website involves a bit of effort, but there are also great perks that pay off. For example, you can increase your search traffic up to 47% by making your website available in more than one language. Not bad, right?

Before you start

You should know that changing the website language from the dashboard area is not enough. Your website’s structure is formed of different parts of posts, pages, menus or widgets. The content of those sections can be added directly to your language. However, there are strings attached, both from the theme and plugins, that you need to translate. Let’s take the following scenario: you have a blog website, and at the end of each article you can have a Read more part. Those specific words should be translated into your native language in order to facilitate access.

The .PO file includes the original texts and the translations in two columns. The .MO file incorporates the exact same contents as PO file. Keep in mind that the two files differ in their format. While a PO file is easy for humans to read, MO files are compiled and very easy for computers to read. Nonetheless, WordPress gets translations from .MO files.

So, first of all, you need to establish if you only want to change the main language of your site or to offer the site in multiple languages:

  1. Single Language: your website uses just a single language. In this case, all you have to do is to translate the theme and the plugins. Everything else, like the content, for instance, is already in your main language;
  2. Multi-Lingual: your website supports more than one language so you need to translate the content too. As WordPress does not support this by default, there are some great plugins that can help you do the job, like WPML.

Depending on the previous two cases, there are slightly different steps that you need to take:

1. Change Site Main Language:

  1. Change the language of WordPress by going to Settings » General » Site Language field;
  2. We mentioned about PO/MO files so now is the time to use them for translating the website:
    1. Translate the theme by downloading translation files from our platform. You can easily find some extra details about this down below;
    2. Translate the plugins by creating the PO/MO files. You can dig deeper here.
  3. Upload the translation files, through FTP:
    1. The theme translation files need to be added to wp-content/languages/themes folder;
    2. The plugins translation files need be added to wp-content/languages/plugins folder.
  4. Make your translations live.

Check out an in-depth article about translating your theme and plugins.

2. Make a Multi-Lingual Site:

  1. Install and activate the core WPML plugins
  2. Configure WPML (see the Getting Started Guide) by selecting your default language, a set of active languages, and a language selector.
  3. Translate all the elements of your website:
    1. Content of your pages, posts and other custom elements (eg. projects);
    2. Menus;
    3. Widgets;
    4. The theme by downloading translation files from our platform. You can find some more details about this down below;
    5. The plugins by creating the PO/MO files. You can find some more details here.
    6. Anything that doesn’t fall inside posts, pages or taxonomy goes into String Translation. This includes the site’s tagline, general texts in Admin screens, widget titles and many other texts. You can find some further info about this right here.
  4. Upload the translation files, through FTP:
    1. The theme translation files need to be added to wp-content/languages/themes folder;
    2. The plugins translation files need be added to wp-content/languages/plugins folder.

Translating the Theme

Using our platform of translations, based on GlotPress, you can use the translations made by other users or create your own translation. This way, you can use other users translations or create your own set of translations.

As you already have an account on our site, you can easily go to the Pixelgrade Translate projects and start working on your language.

How to translate a project:

  1. Go to the projects list;
  2. Select the project that you are working to;
  3. Click on the language you would like to translate your website;
  4. You can suggest a new translation for any of the English original strings, seen on the left. Just click on Details button from the end of the line and add your suggestion;
  5. Once you finished your translation, go to the bottom of the page and select to Export all current as Portable Object Message Catalog (.po);
  6. You need to export one more file, the Machine Object Message (.mo), the same way you did on step 5;
  7. Those two are the files you need to copy on your website.

Note that if your website will be multi-language, you need to download the set of PO/MO files for every language. Then repeat the steps from How to translate a project section for each language of your website.

Updated on April 19, 2017

Was this article helpful?