Search |
Previous page Next page

# Translations

In order to translate the theme to your language, please follow these steps:

- Navigate to themes/Public/languages/ folder and locate en_US.pot file. Copy en_US.pot file to your desktop for editing.
- Open the .pot file using a program like PoEdit. Click on the text to edit and enter your translation at the bottom box.
- 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 saving 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 ).
- Upload the .po and .mo files you just created to your /languages folder so they are in the same directory as the en_US.po and en_US.mo
- Optional step (actual for WordPress version < 4.0): 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('WPLANG', 'pt_BR');