Quantcast
Channel: Tom Rhodes
Viewing all articles
Browse latest Browse all 133

WP Basics – Translating Your WordPress Theme

$
0
0

This is something that comes up often when answering support questions for our customers. So I have written a neat little guide to help you translate your WordPress theme using the PO file provided with your theme.

Tools you will need

The bulk of the work is carried out using a fabulous piece of software called POEdit. This software is free to use, with a premium license available to make the job even easier (aimed more at theme developers). You will also need to ensure your new language files are correctly named, so id suggest to bookmark this list for your reference (we will cover this a little more later)

The process

The begin, head to Settings > General in your WP dashboard and use the language drop down box to change the language to your chosen region. As soon as you hit save you will notice your admin will now display in your chosen language.

b17fecd96c96d172036856ffbb5a9276

Next, load up POedit and select ‘Create New Translation’

fc4454d77e8f03e40386addfa3dfe2b8

You will be asked to supply your PO file next. In most themes you will find this within the languages folder inside your theme itself. Once you have loaded the original language, you can now begin translating things how you want. Begin by choosing your new language from the dropdown box shown.

e03544bf903bb345827b2048e5ddb6c0

You will be presented with a long list of strings/text used by your theme – these will range from text seen only in the WP admin area to text used on the front-end (the bit viewers see) so you may wish to only translate certain areas – this is up to you. To traslate the text, simply select the line you wish to edit and place your desired translation in the box provided.

Once done, your done, you need to save both a MO and a PO file. To do this, head to File > Compile to MO… and save the new MO file within the languages folder of your theme, then head to File > Save as PO and do the same.

IMPORTANT – You must name the file correctly for this to work – to find the correct file name please refer to this list.

 

The post WP Basics – Translating Your WordPress Theme appeared first on TommusRhodus.


Viewing all articles
Browse latest Browse all 133

Trending Articles