Toolset allows you to create and display repeatable field groups. In this page we explain how to set correct translation options and translate repeatable field groups.
For instance, let us say you have a repeatable field group for adding an image gallery to your website’s pages. Each repeatable group has its own image, caption, link (URL), and alt value. The following image shows how your repeatable field group appears when editing a page.
For each gallery item, there are multiple fields and you can add as many gallery items to your page as you like.
Let us see how a repeatable field group can be made translatable.
To be able to translate a repeatable field group you need to set the following two translation settings.
A repeatable field group is assigned to only one specific post type. In this example, the gallery is assigned to the standard “page.”
To make a repeatable field group translatable you need to set this post type to display translations if they exist or fallback to default language.
To do this, go to the WPML −> Translation Management page, click the Multilingual Content Setup tab, and scroll to the Post Types Translation section. Here, select the Translatable—use translation if available or fallback to default language option for the post type that the repeatable field group is assigned to.
Sometimes, a repeatable group is created after its associated post type has already been set to the Translate—only show translated items mode. In this case, the repeatable field group will be completely disabled, even for the website’s default language. If this happens, simply set the post type to display translations if they exist or fallback to default language as described above.
A repeatable field group is a set of regular custom fields. For each of these fields, you can select translation options, just as you can for any other custom fields on your website.
You can usually skip this step because Toolset and WPML will automatically set correct translation options for custom fields. If you need to select specific translation options for your custom fields, use the following steps.
Go to the WPML −> Translation Management page, click the Multilingual Content Setup tab, and scroll to the Custom Fields Translation section. Here, select your preferred options for each field of the group.
Translation options for fields of a repeatable group work the same as for other custom fields.
As with any other type of content, you can translate repeatable field groups manually or by using WPML’s Translation Management.
If you use the regular post editing screen to translate the content, your repeatable field group will appear to be empty. For example, the following image displays our Gallery repeatable field group.
In this example, there are three rows because our page in the website’s default language has three gallery images.
Clicking on an item displays the group field and you can add translations directly.