Skip Navigation
Updated
July 2, 2024

The ACF Blocks feature allows you to create custom blocks with your own layouts and custom fields. Here, we’ll show you how to translate them using WPML.

On This Page:

Required Plugins

To translate ACF blocks, you need to install and activate the following plugins:

How to Translate ACF Blocks

ACF Blocks integrate with the WordPress Block Editor (Gutenberg), allowing you to add them into any post or page. Using WPML, you can translate posts or pages containing ACF block content just like those created with native WordPress blocks.

WPML lets you display the same ACF block content across different languages, simply translated. Or, you can tailor your ACF blocks with different numbers of fields and unique field content for each language.

Based on your approach, you need to choose a translation option for your field group.

Same fields across languages

When you select the Same fields across languages option, you can translate your content:

  • Using automatic translation
  • By yourself, with the help of individual translators, or a professional translation service

No matter your translation method, ensure each custom field has a unique Field Name, especially across different field groups for blocks. Using the same Field Name for multiple fields may prevent some field values from appearing in the Translation Editor.

Below, we’ll show you how to translate a page with an ACF block on your own. We created a simple Testimonial block using ACF and set its field group to use the “Same fields across languages” translation option.

Setting the field group to the Same fields across languages translation option

To translate:

  1. Edit the post or page into which you inserted the ACF block. From the Language box, click the plus icon next to the language you want to translate the post and block content into.
Clicking the plus icon to translate the post with the block content
  1. You will be taken to the Advanced Translation Editor. If you have translation credits, you’ll see the translations filled in automatically. You can review and accept these automatic translations. If you don’t have credits, add the translations for each line and click Complete when you’re done.
Translating the block content in the Advanced Translation Editor
Translating the block content in the Advanced Translation Editor

Different fields across languages

The “Different fields across languages” translation option allows for varying ACF block content and field numbers in different languages.

This requires you to manually translate the block content in each language.

As an example, we made an Agents block with ACF that has one main Repeater field and 4 subfields. To have different block content per language:

  1. Edit the page into which you have inserted your ACF block. In the Language box, select to translate your page with the WordPress Editor. In the popup that appears, select the This Page option.
Selecting to translate the block content with the WordPress Editor
  1. Click the plus icon next to the language you want to translate the post into.
Clicking the plus icon to translate the post
  1. You will be taken to a blank page. Enter the title of the post, the post content, and insert your ACF Block.
  2. Within your block, add as many instances of repeating subfields as you want. Input the field values in your site’s secondary language.
Inputting the block content in the secondary language
  1. When you’re done, Publish the post.

If needed, you can next translate your ACF field labels in WPML’s String Translation.