Skip Navigation
September 26, 2022

The ACF Blocks feature allows you to create custom block types. Here, we’ll show you how to translate them using WPML.

If you want to learn how to translate ACF fields in general, see the Translate Sites Built with ACF page.

Before getting started, make sure to install and activate the Advanced Custom Fields, WPML core, WPML String Translation, and Advanced Custom Fields Multilingual plugins.

With WPML, you can translate ACF block content just like any other WordPress Gutenberg block. For more information on how to create and use ACF Blocks, check out the post introducing ACF Blocks.

In our example, we have created a simple Testimonial block with ACF. Let’s see how to set the block’s ACF field translation preference and translate the block’s content using WPML’s Translation Editor.

Start by creating the block field group by navigating to Custom Fields → Add New:

  1. Fill in the field group name and add the custom fields.
  2. Set the appropriate translation preferences for each field type.
Adding custom fields to the field group and setting the translation preferences
  1. Scroll down to the Settings section and in Location Rules, set the field group to show when the Block is equal to Testimonial. When you’re done, don’t forget to click on the Save Changes button.
Setting the location rules for the custom block

 Now, go to Posts Add New and fill in the post title. Then: 

  1. Click on the plus icon in the content editor and insert the ACF block you created into a post. In our case, it is the Testimonial block.
Creating a new post and inserting the Testimonial block
  1. Fill in the block content and Publish the post.
Filling in the block’s content and publishing the post
  1. In the Language box, click the plus icon next to the language you want to translate your post into.
Clicking the plus icon to translate the post
  1. You will be taken to the Advanced Translation Editor. If you have translation credits, you can translate the content automatically. If not, add the translations for each line and click Complete when you’re done.
Translating the block content in the Advanced Translation Editor