A Repeater or Flexible Content field holds other fields. WPML copies the container and translates each sub-field by its own preference: text is translated, numbers, images and links are copied. The translation gets the same rows and layouts, in the same order as the original. When you move, add or remove a row later, the translation follows. This guide walks the whole path on one post, with Translate Everything on and off.
With Private Translation Cloud (PTC) (opens in a new tab), WPML's AI translation, a post with fifty rows is translated when you publish it, and you do not need to review anything.
For the types of fields, the translation options and the Options Pages, read the ACF documentation hub. Group and Clone fields have their own guide.
What You Need
- Advanced Custom Fields PRO. Repeater and Flexible Content are PRO fields.
- WPML and WPML String Translation.
- ACF Multilingual (ACFML), the add-on that connects ACF fields to WPML.
In our example, a tour site has a Tour details field group on its tours, with two fields:
- a Repeater called Itinerary, one row per day, with a Day title, a Description and a Photo
- a Flexible Content field called Page sections with three layouts, Highlights, Practical information and Call to action, each with its own sub-fields
What WPML Translates in a Repeater or Flexible Content Field
With the field group on Same content in every language, translated, the recommended option, every field gets the translation preference of its type. The container itself is copied. Each sub-field follows its own type:
| Type of sub-field | Preference | What the translation gets |
|---|---|---|
| Text, Text Area, Wysiwyg Editor, URL, Link | Translate | The text in the visitor's language |
| Number, Range, Email, Select, Checkbox, Radio, True / False | Copy | The original's value, kept in sync |
| Image, File, Gallery, oEmbed | Copy | The original's media, kept in sync |
| Repeater, Flexible Content (the container) | Copy | The same rows and layouts in the same order |
In our example, the day titles and descriptions are translated and the photos are copied. A nested Repeater inside a layout works the same way: its rows are copied and its text sub-fields are translated.
The full list of types and their preferences is on the ACF documentation hub. With Same content in every language, translated, a sub-field has no preference control of its own. To give one sub-field another preference, use the Expert option.
What You Need to Do
Check the field group once. Go to ACFField Groups, open the group, and look at the Multilingual Setup box. It should show Same content in every language, translated, the option ACFML recommends. If it shows another option, click Change option and choose it.
With Translate Everything On: Nothing
If you use PTC and your site is on Translate Everything, WPML translates each tour when you publish it, rows included. You do not need to do or review anything. When you change a row later, WPML translates the change too.
You set it up in the Translate Everything Automatically box at the top of WPMLTranslations. Read how to translate everything automatically.
With Translate Everything Off: Send the Post from the Translation Dashboard
You choose what to translate and when. A post with any number of rows is one item in the Dashboard.
- Fill in the rows and publish. In our example, the tour Kyoto temples and tea has three days in its Itinerary.
- Open the Translation Dashboard. Go to WPMLTranslations. Expand the section of your post type and check the box next to the post.
- Choose automatic translation. Under Translate your content, choose Translate automatically for each language. The Dashboard shows the words it will translate.
- Choose Publish without review. Under What would you like to do when WPML finishes translating your content automatically?, keep Publish without review (Recommended). Translations from PTC are ready to publish.
- Send it. Click Translate content. A popup confirms Sent for translation.
The translation completes in minutes and is live. In Translation Jobs, the job shows Completed. Read more about the Translation Dashboard.
See the Translated Rows
You can look at the translation to see for yourself. Open the translated tour in the WordPress editor, from the post list in that language:
- The Itinerary has the same days in the same order.
- Each day title and description is in that language, with the original under it.
- The photo is the original's, with a lock icon. It is copied from the default language and kept in sync.
- The layouts of Page sections are in the same order, and the texts inside them are translated the same way.
On the site, visitors in that language see the days and the sections in the same order, with the same photos.
When You Add, Move or Remove a Row
You edit the original post, in the default language. The translations follow:
- Move a row or a layout. Drag it to its new place and save. The translated rows move with it at once, each translated text with its own row.
- Add a row or a layout. Save. WPML marks the translation as needing an update. With Translate Everything on, it is translated by itself. With it off, send the post again from WPMLTranslations; you pay only for the new words. The translation gets the new row in its place.
- Remove a row. Save. WPML marks the translation as needing an update, and the next translation removes the row from it.
Between the change and the next translation, the translated post still shows its old rows. Translate it, or wait for Translate Everything, before you compare it with the original.
Expert Field Groups: The ACFML Synchronise Translations Box
When the field group uses the Expert option, or a post uses field groups with different options, the editor of the original post shows an ACFML Synchronise translations box. Keep its option, Keep repeater and flexible sub-fields in the same order as the default language, selected. It does for Expert groups what the recommended option does by itself.
If You Want to Change a Translation
You do not need to check anything. If you want to change a translated row, do it this way:
- Open Translation Jobs. Go to WPMLTranslationsTranslation Jobs.
- Click the pencil on the job's row. Its title is Edit Translation. The Advanced Translation Editor opens with an Advanced Custom Fields (ACF) box. Each row's text is its own segment, tagged with the field, the row number and the sub-field: Itinerary #2 / Day title. A layout's segments carry the layout's name and position the same way. Copied sub-fields, like the photo, have no segment.
- Edit what you want. Change the segment in the editor.
- Click Save and Complete. Always finish this way, even with no change. Otherwise the job stays In progress.
When you use PTC, it learns from your edits, so you do not need to keep making the same corrections.
If It Looks Wrong
- A number or an image shows the original's value in every language. By design: these sub-fields are copied. If one must differ per language, put the field group on Expert and set that sub-field to Translate or Copy once.
- The rows are out of order in a translation of an Expert group. Open the original post and select the option in the ACFML Synchronise translations box, then save.
- A row you removed is still in the translation. The translation is marked as needing an update. Send the post again, or wait for Translate Everything, and the row goes.
For Developers
ACF stores a sub-field's value under <field>_<row>_<sub-field>. In our example, the second day's title is itinerary_1_day_title, and the first layout's heading is page_sections_0_heading.
WPML translates or copies each of these keys by the sub-field's preference and writes them in the same order on the translation.
For a field group registered in PHP or Local JSON, set wpml_cf_preferences on each sub-field, as on the hub page. To change what WPML does with a field, use the ACFML hooks.