Skip to toolbar

Polylang

We’ve worked with Polylang to open up Pods for translation. Here are some of the most common configurations needed to setup Polylang to Translate Pods and also any areas we are not compatible.


Translate custom post types and taxonomies.

Set a Pod public
Pod public setting

In order to let Polylang see your custom post types and taxonomies these need to be public (Advanced Options).
Once they are public you can enable translations in the Polylang settings page.

Once translations for a post type or taxonomy is enabled Pods automatically switches to the correct language for relationship fields and file/media fields.

Translate non-public custom post types and taxonomies:

You can enable this through filters (PHP, see example in snippet below):

Translate Pods Templates:

You can use the following snippet:

Translate & sync meta fields.

Polylang can auto-sync meta fields though there is only one option: all fields or none.
Also keep in mind that syncing meta fields doesn’t translate these fields but merely copies the data.

Translation of meta fields can only be done manually.

More info: Github #1851

Questions

  • I’ve noticed some of the Pods strings aren’t translated into my language. How do I fix or help with that?

    pods___custom_content_types_and_fields_____wordpress_pluginsPods is translated to all the languages WordPress handles through Glotpress (http://translate.wordpress.org) so .po or .mo files are needed in your install. These files (once downloaded) go in your /wp-content/languages/plugins/ folder and should be named something like pods-LOCALE.mo for each specific Locale.

    If you’d like to help out, just go to https://translate.wordpress.org/projects/wp-plugins/pods and select your language to translate strings. A moderator for that language can then approve/disapprove that string.

    When you select your language, you can also see the strings of the development version. This way you can prepare your translations before actually going live with the new version.

    See the green button in bottom right corner on the main plugin page on the repo that says ‘Translate this Plugin’? That also takes you right to the translation website.

    Our translation (the acceptance of strings) actually goes faster if we have our own moderators for different languages. If you become an official translator and your translation string gets accepted, you also get a nice WP badge on your WordPress.org profile that you have contributed to the translations of WordPress plugins.

    If you need translation of your custom post types and taxonomies, we have solutions that work with both WPML and Polylang.

     

  • My language says its translated but it’s not working for Pods

    If strings in stable are approved for at least 95% for a plugin/theme in a certain locale, the generation happens every 6 hours (00:00 UTC, 06:00 UTC, 12:00 UTC and 18:00 UTC). Then any local WordPress set to use that specific locale will download it in the next hours after the generation. Strings in readme are deployed almost immediately.

    https://make.wordpress.org/polyglots/handbook/frequently-asked-questions/#strings-are-validated-when-are-they-taken-into-account-for-download

    If your language translation is under 95%, you will need to manually download the strings for your language. You can export all strings but you will manually need to create a .mo file for this.

    As an example, if you are wanting to get the German (DE), Deustch files for your translation, you have to actually go into the language page (ie for German):
    https://translate.wordpress.org/projects/wp-plugins/pods/stable/de/default

    At the bottom of that page there’s an import/export section. You can download the Portable Object Message Catalog (.po) and Machine Object Message Catalog (.mo) files by selecting those options from the drop-down and selecting ‘export’.

    Language File Export Dialog

    The files will be named incorrectly for use in your /wp-content/languages/plugins/ directory, but can be easily renamed to:

    pods-de_DE.mo
    pods-de_DE.po

    (in the style plugin-<language code>_<language code UPPERCASE>.mo/.po and dropped in that directory and they should work automatically.