Translating the plugin
The base plugin is translated via the Transifex platform. Once on the project page, you will be able to download the translations and/or register to become a translator.
We maintain a list of translations for our add-ons on GitHub. Please visit the github repository marvinlabs/wpca-translations. In turn, feel free to contribute to that repository by sending us your own files for every missing or outdated translation. You can do that by shooting an email to firstname.lastname@example.org.
Translation files are organized into folders corresponding to the add-on name. Each translation is then named after the add-on code and a language code.
wpca-additional-owner-types/cuarep-pr_BR.mo is the translation file for the add-on “Additional owner types” in Portuguese language from Brazil.
You can download all the repository by clicking the green “Clone or download” button, or by directly following this link to the download page.
Translations consist of a
PO and a
MO file. If you do not plan to update the translation, you would only need the
MO file. Otherwise, you will need to edit the
PO file and compile it to a
MO file (see below).
Where to store your translation files?
If you store the language files directly in each add-on’s
language sub-folder, you will loose them after each plugin update.
In order not to loose those changes each time, WP Customer Area allows you to store the language files in a safe location: you can put your
MO files in the
wp-content/customer-area/languages folder of your website.
How to create or update translation files?
Start by downloading and installing the open-source software PoEdit. Available for free, this is the tool commonly used by the translators of WordPress plugins and themes.
All this work should happen within the plugin’s language folder in order to be able to update the translation file. You can then copy your translations to the safe location once it is ready.
1 – If the file does not already exist, create it
- Copy an existing
.pofile for the plugin you want to translate and rename it according to your language code. For instance,
cuarep-fr_FR.powould be renamed to
cuarep-pt_BR.pofor portuguese language from Brazil.
- Open the file just created with PoEdit
- Refer to the PoEdit documentation in order to change the file information (language, creator, etc.)
2 – Edit the PO file
- click on the Update button in PoEdit and note the apparition of new strings in blue color. This action has the effect of check in source files if new texts require translation, or if obsolete items should be removed
- In the left column, we find english strings – the base language. In the right column, strings translated into your language or empty fields for those missing. Fill these fields one by one by one and/or correct the strings incorrectly translated
- Click on the File > Save menu item to save your changes. PoEdit will generate a
.mofile in addition to your
- Using an FTP client, upload the new translation files to the
wp-content/customer-area/languagesfolder on your server;
- Go back to your website: strings should now be displayed into your language.
About the translation of WordPress themes
The only difference is in the naming of the translation files. Just specify the language code in the form:
es_ES.po, etc. This information is particularly useful if you need to translate one of our WP Customer Area certified premium themes.