On This Page:
- Required Plugins
- Choose How You Want to Translate Each Field Group
- How to Translate ACF Fields After Selecting a Translation Option
- More Things You Can Do with ACF Multilingual
To build a multilingual and ACF-charged website, you need to install and activate the following plugins:
- The ACF plugin (latest PRO version required for Repeater fields and other additional features)
- WPML core
- WPML String Translation
- The Advanced Custom Fields Multilingual (ACFML) plugin
- The WPML Media Translation add-on (If you want to use different files and/or images in your default and secondary languages)
Advanced Custom Fields (ACF) lets you create diverse field groups tailored to meet your website’s specific needs. This flexibility means that each field group might require a different translation approach.
Let’s say you run a tech website and create ACF custom fields to introduce products, like Product Description, Release Date, and Specifications.
You want to show the same information across all your site’s languages and just simply translate the content.
A product review in the default language
A product review translated into Spanish
Now, picture you’re developing a website for a tutoring service. You’re using custom fields for details like Tutor Name, Subject, Bio, and Price per Hour. On this platform, you have different tutors for your English-speaking and Spanish-speaking audience.
So, you need the ability to display different field values and even a different number of fields in each language.
A page with custom fields introducing English-speaking tutors
The translated page with custom fields introducing Spanish-speaking tutors
With ACF Multilingual (ACFML), you can pick the translation option that best meets the unique needs of each of your field groups. You have two main options to choose from.
- Same fields across languages – This option is best when you want to translate your content and keep your field values the same in all languages, like in the example for product descriptions on a tech website.
- Different fields across languages – You can opt for this translation option if you want different content, a different number of fields, or a different layout in each language, as seen in the tutoring website example.
You can set the translation option for each field group by:
- Clicking the Set translation options button in the prompt that appears after you activate ACFML.
- Going to ACF → Field Groups and clicking Edit for each field group.
If you don’t set a translation option for a field group, you won’t be able to translate its fields.
Once you set the translation options for your field groups, it’s time to translate your ACF fields. These fields are part of the posts they’re attached to, so translating a post means translating its ACF fields as well.
When you select the Same fields across languages option for your field group in WPML, you only need to send your post or page with the custom fields for translation in WPML → Translation Management. You can choose to send the content for automatic translation, assign it to another translator, use a professional translation service, or handle the translation yourself
If you decide to translate the content yourself, taking the translation job opens WPML’s Advanced Translation Editor. This is the default editor for translations in WPML.
In the editor, you’ll see your main content and the custom fields ready for translation.
Make sure each of the custom fields across your different field groups has a unique Field Name. If you use the same Field Name with more than one custom field, you may not see all your field values available for translation in the Advanced Translation Editor.
With the Different fields across languages option, each language version can have its own custom field values and layouts, allowing for unique designs and content in different languages. This requires you to manually translate the post and its fields in the WordPress editor you’re using (Gutenberg, Elementor, Divi, etc.).
You only need to follow a few simple steps:
By selecting Different fields across languages for your field group, WPML automatically sets up the correct translation process for you. You don’t need to configure which translation editor the plus (+) icon leads to – WPML knows that you want different content for each language version.
When you view your default and secondary language pages on the front-end, you’ll see the translations connected and each language version showing its own field values and layout.
Page with custom fields in the default language
Translated page with a different field values
Check out these related topics for more in-depth information on using ACF and WPML: