#1 Independent Seller of WooCommerce Plugins
Switch language
English

< Back to all articles

How to translate a theme or plugin in a few simple steps

When you sell and buy products made in several different places in the world, one of the issues you might run into is surely the language.

Ok, English is the universally used language, but it just isn’t nice to run into a website that has some bits in one language and other bits in another.

Other than confusing users, that would also look rather unprofessional.

Obviously not every plugin can be translated into every other language in the world, so it’s common to leave it up to the user to translate it into their own native language.

So here is a question: “Is it hard to translate a WooCommerce theme or plugin?

Well, it’s easier than it seems! In this tutorial I’m going to show you how to translate a plugin in a quick and easy way.

How to translate a theme or plugin using Poedit

In order to translate your WooCommerce theme or plugin, you need to download Poedit, a free software that allows user to edit the language files.

Luckily Poedit’s interface is simple and easy to understand, which makes it ideal for beginners and those who struggle to use programs they are not familiar with.

In this tutorial I’ve chosen to translate the WooCommerce Plugin YITH WooCommerce Stripe, however, it would be exactly the same process for any other theme or plugin.

Once the plugin is downloaded, extract it from the .zip archive, then open the Languages folder (see the image below):

Language

If the theme or plugin you wish to translate is available for translation, then you should fine a .pot file within this folder containing all the lines in the theme or plugin that can be translated into other languages. Open this file with Poedit:

pot

Once this program is open, you will find all the line of text that belong into theme or plugin you’ve chosen. To begin, click on “Create new translation”:

Stripe-poedit

Now you should decide which language you are going to translate it into, by using a simple drop down menu. In this example, we are going to translate it into Italian:

Stripe-poedit-italian

Now the real translation process begins and as you can see, it couldn’t be more simple.

This screen is divided into two columns: on the left you find the original line, on the right you will enter its translation.

Translate

Once every field is filled, click on “Save” on the top left corner.

The translation name is automatically going to include the language the plugin was translated into. In my case I will find it_IT since I translated it into Italian, if it was Spanish, I would have found es_ES and so on.

Poedit-save

Be careful: make sure to edit the name of the file you are saving by entering the slug of the theme or plugin you are translating.

In this case, the slug is yith-woocommerce-stripe, which is why I’m going to save this file as: “yith-woocommerce-stripe-it_IT”.

Stripe-poedit-italian-save

You can usually find this slug into the theme/plugin documents. When it comes to our own themes and plugins, you will find it among the documents, in the “Localization” page.

So this is how to easily translate a WordPress theme or plugin, now all you need to do is download Poedit and start translating!

After translating all of the strings in our plugin and obtaining our two files, we need to insert them in the “Languages” folder of the plugin. To do this, we need to have FTP access to the files in our website.

In case the admin panel of your hosting service is cPanel, simply go to the File Manager:

1

You will now see an overview of the content of the website. Themes and plugins are in the “wp-content” folder:

2

In this guide we are editing the language of the YITH WooCommerce Stripe plugin, so let’s open the Plugins folder:

3

And let’s find the folder:

4

Inside we will find the “languages” folder, in which we will upload the two newly created Poedit files:

5

In order to upload the files, let’s explore the upper bar and click on “Upload”:

6

And we are set! Remember: the plugin will apply the new language automatically only in case the dafault system language in WordPress is the same!

P.S. If you use one of our plugins or theme, please send us your translations so that they can be shared among other users. You will be mentioned in our website in the documents and the changelog file of the plugin 🙂

Suggested readings

Join our newsletter to get all news directly in your e-mail!