PeepSo Docs

Translate PeepSo To Your Language

The official translations project for PeepSo is located at Crowdin. If you wish to contribute to existing translations, you can login to Crowdin and join the translators team.

There are, however situations when available translations simply don’t cut it. Maybe you’re not happy with the translation, maybe translation is in formal format when you need the casual one. Don’t worry, you can make your own translations with the little effort.

In this article, we will use PoEdit application for macOS, but the same software is available for Windows and Linux

Once you download and install PoEdit, open the application and select “Create New Translation”

You might be wondering why not selecting “Translate WordPress theme or plugin” and you’re right, it will be easier to do so, but you’ll need paid version of PoEdit to do this, so we’ll stick with “Create New Translation” in this exercise.

The popup window to select the POT file will now be shown.
Locate the POT file you want to translate and open it. POT files for plugins are always in this location.

ROOT/wp-content/plugins/PLUGIN-NAME/language

Examples:
if you want to translate PeepSo Foundation plugin, then the location would be:
– ROOT/wp-content/plugins/peepso-core/language/peepso-core.pot

If you want to translate Groups plugin, then the location would be
– ROOT/wp-content/plugins/peepso-groups/language/groupso.pot

Note: Please be advised that some plugin names have been changed over the course of PeepSo development to better suit or represent the features of a plugin. For example, if you want to translate Chat plugin, it is actually called peepso-messages and it’s language file msgso.pot
To avoid conflicts and having to redo all language files, we didn’t change the POT names.

Once you selected the POT file to translate, PoEdit will ask you what language you want to translate file to. Choose the language and press OK.

Now you are ready to start translating PeepSo to your language.
Enter your translations in a “Translation” box and do this for each string individually
Once you’re done with the translation, save the file. PoEdit will now ask you to name the translated file.

Translations must follow this naming convention:

pluginname-LANGUAGE_CODE.po

Note: The file must be saved using po extension. There is no typo here.

Examples:

If you wish to translate peepso-core.pot in German language, the file name will be peepso-core-de_DE.po
If you wish to translate friendso.pot in French language, the file name will be friendso-fr_FR.po
If you wish to translate picso.pot in Spanish language, the file name will be picso-es_ES.po

When you save the file, PoEdit will actually create two files, one with extension po and the other with extension mo

How to Discover What Language Code To Use

If you are not sure what language code you should be using when saving the file, you can use a very simple trick to learn what is the code you need.
Go to WP Admin -> Settings – General and change the language of your site.
Now take a look into ROOT/wp-content/languages
WordPress should already add some language files with appropriate language codes for selected language.

Applying translations

When you have all po and mo files ready, copy them into
ROOT/wp-content/languages/plugins/

Maintaining the Translation File

Because each new version of PeepSo and it’s supporting plugins contains a new .POT file, to remain accurate, translation files must be updated with each new release. To update the translation file:

Open your po translation file with PoEdit

Click “Catalog” and then “Update from POT File…

You will then see a summary of the updates including new strings that have been added and old strings that have will be removed.

Click “OK” to merge the changes into your translation file.
Translate the new strings.
Save the new po and mo files.