How to Translate a WordPress Theme Using Poedit


WordPress

Themes

Most of the WordPress themes come with one and only language – English. This tutorial shows you how to translate any WordPress theme to your local language of choice.

What You’ll Need

Before you begin this WordPress guide, you’ll need the following:

  • Poedit software installed on your computer. Poedit is available on OS X and Windows and can be downloaded from here.
  • WordPress Theme files on your computer.

Step 1 — Opening Your Theme’s Default Language Template

Open Poedit and select Create new translation:

A new window will pop up, select the WordPress theme you want to translate. A Theme’s default translation template is located in THEMEXXX/lang/YYY.po, where THEMEXXX is the name of your theme and YYY – default language of the theme (twentysixteen/lang/en_EN.po in this example):

Select a template for translation

Next, from a dropdown menu select a language you want to translate your theme to:

Select language to translate your theme to

You are ready to translate your theme now.

Step 2 — Translating Your Theme

Highlight any string you want to translate:

Highlight any string you want to translate

In the Translation section enter a desired translation of the source string:

Entering translation

Once you have translated your theme, save the file (lt_LT in this example) in the same directory as the original template:

Saving the translation file

Step 3 — Changing Your WordPress Website Language

Upload the .po file you have saved in step 2 (lt_LT.po in this example) and .mo file (lt_LT.mo was generated automatically by Poedit) to the corresponding directory on your hosting account.
The directory should look similar to public_html/wp-content/themes/THEMEXXX/lang, where THEMEXXX is the name of your WordPress theme. Check out how to upload files to your website.

Open up wp-config.php file (it is located in your WordPress installation) and add the following line:
define ('WPLANG', 'ZZZ');, where ZZZ is the name of the file you have used to save your translation (lt_LT in this example):

Editing wp-config.php file

Your Theme will now appear translated:

Translated theme

Conclusion

Now you know how to translate your WordPress theme using Poedit translations editor. This skill is valuable if you want to adapt your website to your local language. The same translation principle applies to WordPress Plugins as well.

Jaspreet Singh Ghuman

Jaspreet Singh Ghuman

Jassweb.com/

Passionate Professional Blogger, Freelancer, WordPress Enthusiast, Digital Marketer, Web Developer, Server Operator, Networking Expert. Empowering online presence with diverse skills.

jassweb logo

Jassweb always keeps its services up-to-date with the latest trends in the market, providing its customers all over the world with high-end and easily extensible internet, intranet, and extranet products.

Contact
San Vito Al Tagliamento 33078
Pordenone Italy
Item added to cart.
0 items - 0.00
Open chat
Scan the code
Hello 👋
Can we help you?