Synchronize metadatas between translations

  1. Taxonomies
  2. Comment status, Ping status, Sticky posts
  3. Published date
  4. Post format
  5. Featured image
  6. Page parent
  7. Page template, Page order
  8. Custom fields

Polylang offers the possibilty to synchronize some meta content and options between translations of a post or page. Note however that, whether the synchronizations are activated or not, Polylang always copies all metadatas from the source post when creating a new translation. The content can also be copied when using Polylang Pro.

Go in Languages > Settings.

All synchronizations are de-activated by default and you can activate then by checking the corresponding options in the Synchronization module. Once a synchronization option is checked, a modification to a post or page impacts all its translations.

In some cases an option may seem to have no effect.  It is indeed possible for plugins and themes to force a choice programmatically (or by using a wpml-config.xml file for the custom fields).

synchronization-module

1.Taxonomies

Polylang handles the synchronization of the categories, tags and custom taxonomies whether they are translatable or not. A modification of your post’s taxonomies will impact all its translation.

Example with a translated taxonomy: If you choose to add the category ‘Category FR’ to a French post, Polylang will automatically add its translation ‘Category EN’ to the translated English post. It’s the same behavior if you decide to remove a category.

taxonomies-synchronization

Example with an untranslated taxonomy: Let’s say that you have a non translatable custom taxonomy ‘Size’ for the translatable custom post type ‘Suits’. If you choose to add “XL” to the custom post ‘Swim suit’ in English, the same size ‘XL’ will be copied to its French translation ‘Maillot de bain’.

Individual synchronization of taxonomies: The option in Polylang settings is for all taxonomies and does not allow to activate the synchronization for some taxonomies and not for the other. Developpers can however achieve this thanks to the filter ‘pll_copy_taxonomies’.

2. Comment status, Ping status, Sticky posts

When the synchronization is activated, if you check the options comment status, ping status and sticky posts status, in your English post, your choice is automatically copied to the translated French post. Of course, if you uncheck them in your English post, they will be automatically unchecked in the French post too.

comm-statu-ping-sticky-synchronization

3. Published date

Example: If you assign a new published date to your English post, Polylang will automatically assign this new published date to the translated post in French. The synchronized published date is always the last entered date.

published-date-synchronization

4. Post format

Example: When the post format is synchronized, if you choose to assign the Video post format to your English post, the same post format will automatically be assigned to the French translation too.

post-format-synchronization

Polylang handles the synchronization of the featured image whether you chose to translate media or not.

Example: When the feature image synchronization and media translation are activated, if you assign the ‘image-en’ as featured image to your English post, the translated image ‘image-fr’ would be automatically assigned as feature image for the translated post in French. If media would not be translatable, the same image would be assigned as featured image for both posts.

featured-image-synchronization

6. Parent page

Example: Let’s say that you have an English page ‘Parent-en’ with its French translation ‘Parent-fr’ and an English page ‘Child-en’ with its French translation ‘Child-fr’.  When the parent page synchronization is activated, assigning ‘Parent-en’ as parent of ‘Child-en’ automatically assigns its ‘Parent-fr’ as parent of ‘Child-fr’.

7. Page template, Page order

Example: If you check the synchronization option, and you choose the ‘Full-width Page Template’ for your English page, The same template is assigned to the translated French page. It’s the same behavior for the page order.

8. Custom fields

Check the Custom fields synchronization option to duplicate the same values between translations. If you modify the values of your custom fields in an English post, the same custom fields with the same values are assigned to the translated post.

custom-fields-synchronization-checked

Keep the custom fields synchronization option unchecked if you need to keep different custom fields or different values accross translations.

custom-fields-synchronization-unchecked

Activating the custom fields synchronization may lead to unexpected results with some third party plugins and themes storing their data as custom fields.

Individually synchronize custom fields: The option in Polylang settings is for all custom fields and does not allow to activate the synchronization for some custom fields and not for the other. Developpers can however achieve this thanks to the filter  ‘pll_copy_post_metas’ or with a wpml-config.xml file.