Translate the theme
Need to translate the theme into another language? No problem, it’s fully localized and translation ready. Follow the simple steps below:
- Download and install PoEdit. (PoEdit is a free software and its available for Mac, Windows and Linux. Download PoEdit from http://www.poedit.net/download.php)
- Create a new catalog (the local language file)
- Start PoEdit and click on the File menu and select the option New catalog from POT file.
- This will open the file dialog box. Go to the languages folder of the theme. Select All Files from the file dialog box, and open the en_US.po file in the languages folder.
- Now PoEdit will ask you for various configuration options. The most important thing here is to choose the correct country and language you are translating to.
- In the remaining fields of the configuration window, fill the required information or just leave them empty.
- Now click on the Paths tab and change the path variable to the place where your theme files are located.
- Then press OK.
Now PoEdit will ask you to name the file. Its very important to name the file correctly. The naming convention for these files is languageCode_countryCode. The language code must be in lower case while the country code should be in upper case. So, if you are translating the theme for UK English, the file name will be en_UK. Similarly, for translation to french, it will be fr_FR and so on. You can find a list of language codes and country codes here http://www.w3.org/WAI/ER/IG/ert/iso639.htm.
Translate the Theme
This is the step where we will actually translate the theme. After Step 2 above, you’ll see the standard interface of PoEdit where the left panel contain the strings in the original language and the right panel containing the translations. The right panel will be empty as we haven’t started the translation yet.
Start translating each string one by one. Click on the first string and press Tab button. This will take you to the translation box in the bottom. Type the translation here. Your change will reflect immediately in the right panel. Once you are done with this string, press Enter and move on to the second string. Repeat this procedure until all the strings are translated. After the translation is done, save the file.
Starting from Primetrans Logistics theme, strings of the theme are split. Due to new Themeforest requirements, we have to separate theme custom functionality (custom post types, elements). All this functionality is located in Ninzio-addons plugin, that comes with the theme. You will need to install it when installing the theme. Some strings of the theme, like portfolio strings, shortcodes/elements are located in wp-content >> plugins >> ninzio-addons >> languages >> ninzio-addons.po file. You will need to translate this language file too. The process is the same as theme language file translating, the only difference is that your translated file naming for ninzio-addons plugin should be like this – ninzio-addons-xx_XX.po, where xx_XX is your language code.
Then open wp-config.php located in the root of your WordPress installation and change line 72 to reflect your new language file.
define ('WPLANG', 'en_GB');
Upload The Files To Your Server
When you save the catalog file in Step 3 above, PoEdit will create two files, a .po file and a .mo file. Upload both these files to the languages directory of your theme. Also upload wp-config.php to the root of your WordPress installation and you’ll be good to go.