Using
UsingSynchronizing and translating meta

Synchronizing and translating meta

Gato AI Translations for Polylang can synchronize and translate meta data from your theme and plugins.

This video explains how to copy ACF meta fields from the origin post to the translated post, translate meta fields, and also translate entity IDs to each corresponding ID in the target language.

Synchronizing and translating ACF meta data. Watch on YouTube

How it works

In the Settings > Meta Configuration tab, define what meta keys to:

  1. Any value: Copy directly
  2. Strings: Copy and translate
  3. Entity IDs: Copy and replace with the corresponding entity ID for the target language
Configuring the meta keys for translation
Configuring the meta keys for translation

Each meta key can be defined via its name, or using a regex:

For instance, any of these entries match meta key "_yoast_wpseo_title":

  • _yoast_wpseo_title
  • /"_yoast_wpseo_.*/
  • #"_yoast_wpseo_([a-zA-Z]*)#

You can indicate if the provided entries are included, or excluded.

Copy directly

The meta value will be copied directly from the origin to the target entry.

Use inputs:

  • Copy Meta for Custom Posts and Media
  • Copy Meta for Tags and Categories

Copy and translate

The meta value will be copied and translated to the target language.

Use inputs:

  • Translate Meta for Custom Posts and Media
  • Translate Meta for Tags and Categories

Accepted meta values:

  • Single string. Eg: "hello world"
  • Array of strings. Eg: ["hello", "world"]
  • Object of strings. Eg: {"level1_key1": "hello", "level1_key2": "world"}

Copy and replace entity IDs

The meta value will be copied and replaced with the corresponding entity ID for the target language.

Use inputs:

  • Translate Entity References on Meta: Custom Posts and Media IDs
  • Translate Entity References on Meta: Tags and Categories IDs

Notice that both inputs apply when editing any entity: posts, tags, categories, and media.

For instance, a post can have a meta entry that references a list of tags, and those tags must be replaced with the corresponding entity IDs for the target language.

Accepted meta values:

  • Single entity ID. Eg: 123
  • Array of entity IDs. Eg: [123, 456]
  • Object of entity IDs. Eg: {"level1_key1": 123, "level1_key2": 456}