Translations and Language Overrides

We welcome translations of PeepSo and its supporting plugins. The easiest method is to use  Poedit. It’s a translations editor for translating apps and sites (that use gettext). Here’s how you do it:

  1. Open Poedit and select “Create new translation”.
    Poedit first screen
    Poedit first screen
  1. Find the .POT file of the plugin you want to translate. The file should be located in /wp-content/plugins/PLUGIN_DIRECTORY/languages/, substituting “PLUGIN_DIRECTORY” for the plugin of your choice.
    For example, the language file of PeepSo Core can be found in:
    /wp-content/plugins/peepso/languages/
    The language file of FriendSo is in:
    /wp-content/plugins/peepso-friends-1.1.0/languages/
  2. Pick the language into which you want to translate the plugin. In this example, we’re translating into German so we use the language code “de_DE”.
    Pick a language of translation
    Pick a language of translation
  3. Translate each string separately.
  4. When you’re finished, press “Save”.
  5. Poedit will ask you to name the translated file. Name the file using this naming convention:
    [pluginname]-[language_code]
    For example, a file containing a German translation of PeepSo Core must be called:
    peepso-de_DE
    A file containing a German translation of FriendSo must be called:
    friendso-de_DE
    Note: If the file is improperly named the translation will NOT work.On save, Poedit will create a .po and a .mo file with the same name.
    For example:
    peepso-de_DE.po
    and
    peepso-de_DE.mo
  6. After above points are done your translation will then be complete and you’ll be able to share your translation files with others.

Naming Convention For PeepSo Translation Files

The file names for translations of PeepSo and its supporting plugins must follow a strict naming convention. Even though the plugin names are written in
CamelCase, the translation file names (though not the language code) must all be lowercase.

See the examples below:

PeepSo

peepso-LANGUAGE_CODE

EXAMPLES:

  • English (United States):
    peepso-core-en_US.po
    peepso-core-en_US.mo
  • German (German):
    peepso-core-de_DE.po
    peepso-core-de_DE.mo

MsgSo

msgso-LANGUAGE_CODE

EXAMPLE:

  • English (United States):
    msgso-en_US.po
    msgso-en_US.mo
  • German (German):
    msgso-de_DE.po
    msgso-de_DE.mo

FriendSo

friendso-LANGUAGE_CODE

EXAMPLE:

  • English (United States):
    friendso-en_US.po
    friendso-en_US.mo
  • German (German):
    friendso-de_DE.po
    friendso-de_DE.mo

PicSo

picso-LANGUAGE_CODE

EXAMPLE:

  • English (United States):
    picso-en_US.po
    picso-en_US.mo
  • German (German):
    picso-de_DE.po
    picso-de_DE.mo

LocSo

locso-LANGUAGE_CODE

EXAMPLE:

  • English (United States):
    peepso-location-en_US.po
    peepso-location-en_US.mo
  • German (German):
    peepso-location-de_DE.po
    peepso-location-de_DE.mo

MoodSo

moodso-LANGUAGE_CODE

EXAMPLE:

  • English (United States):
    peepso-moods-en_US.po
    peepso-moods-en_US.mo
  • German (German):
    peepso-moods-de_DE.po
    peepso-moods-de_DE.mo

TagSo

tagso-LANGUAGE_CODE

EXAMPLE:

  • English (United States):
    peepso-tags-en_US.po
    peepso-tags-en_US.mo
  • German (German):
    peepso-tags-de_DE.po
    peepso-tags-de_DE.mo

VidSo

vidso-LANGUAGE_CODE

EXAMPLE:

  • English (United States):
    vidso-en_US.po
    vidso-en_US.mo
  • German (German):
    vidso-de_DE.po
    vidso-de_DE.mo

Applying Translations For PeepSo And Its Supporting Plugins

Translation files must be placed in the languages directory of WordPress:
/wp-content/languages/plugins/

If the /plugins/ dir does not exist, you’ll need create it. You’ll then be able to copy the .po and .mo translation files of the plugins you want to translate into this directory.

For example, if you had translated all of PeepSo into German, the /wp-content/languages/plugins/ would contain the following files:

msgso-de_DE.po
msgso-de_DE.mo
friendso-de_DE.po
friendso-de_DE.mo
picso-de_DE.po
picso-de_DE.mo
peepso-location-de_DE.po
peepso-location-de_DE.mo
peepso-moods-de_DE.po
peepso-moods-de_DE.mo
peepso-tags-de_DE.po
peepso-tags-de_DE.mo
vidso-de_DE.po
vidso-de_DE.mo
peepso-core-de_DE.po
peepso-core-de_DE.mo

Maintaining Translation Files

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

  1. Open the translation with Poedit.
    Click “Catalog” and “Update from POT File…”
    Maintaining existing translations basing on new .POT file
    Maintaining existing translations basing on new .POT file
  1. Locate and open the .POT file. The file should be located in:
    /wp-content/plugins/PLUGIN_DIRECTORY/languages/ directory.
    For example:
    /wp-content/plugins/peepso/languages/.
    You will see a summary of the updates including new strings that have been added and old strings that will be removed.
  1. Click “OK” to merge the changes into your translation file.
  1. Translate the new strings.
  1. Save the new .po and .mo files.

Creating Language Overrides For PeepSo And Supporting Plugins

The process for creating language overrides is almost the same as the process for creating translation files. The differences are:

  • You only need to translate the strings you want to override, not the entire file.
  • Save the file using the language code that your site is using by default. For example, if your site is using English (United States), use the
    language code “en_US”. The files containing the language overrides would be called:
    peepso-core-en_US.po
    and
    peepso-core-en_US.mo
  • Place the files in the /wp-content/languages/plugins/ directory. If the directory does not exist, create it.