Okay
  Print

How I can translate your theme?

You need to translate the ...\languages\default.po file. To translate it into your language, you should:

1. Copy default.po file to your desktop for editing.

2. Open the .po file using a program like PoEdit http://www.poedit.net/. Click on the text to edit and enter your translation at the bottom box.

3. Next, you have to save your .po file using the naming convention based on the language code (e.g. pt for Portuguese) followed by the country code (e.g. _BR for Brazil)

To break it down; the first lower-case letters define the language, whereas the second upper-case letter define the country. In many cases the language and country will be the same, like “de_DE” for Germany, but what about languages like English or Portuguese, that are spoken in several countries natively? In these cases there will be a difference in the first and second letter pairs; for the UK, the code would be en_GB, whereas for the USA it will be en_US. If you’re not familiar with the codes for your native language and country you can head over to the GNU website, where they have all the codes for Language and Country. Remember, if you use the wrong naming convention WordPress won’t be able to use your translation, so double-check if necessary.

So, the Brazilian Portuguese file would be called pt_BR.po. When saing your .po it will automatically create a new .mo file for you, with the same naming convention ( so using the example above, the file would be called pt_BR.mo

4. Upload the .po and .mo files you just created to your /languages folder so they are in the same directory as the default.po and default.mo

Optional step ( actual for WordPress version < 4.0 ):

5. The last step is to tell WordPress what language to show. Open your wp-config.php file in a text editor and search for: define('WPLANG', '');

Edit this line according to the .mo file you've just downloaded, e.g. for the Portuguese spoken in Brazil you must add: define define('WPLANG', 'pt_BR');