The Advanced Custom Fields Multilingual plugin facilitates the translation of websites created with Advanced Custom Fields (ACF) within WordPress. To achieve this, you need to configure WPML (WordPress Multilingual) to handle the translation of ACF’s fields, including complex ones like repeater fields and flexible fields.
Here’s how WPML works in conjunction with Advanced Custom Fields:
- Translation Process: When you use WPML to translate a post from your default language, WPML creates a new post in your secondary language. You do not need to manually link the post in the secondary language to the one in your default language. WPML handles this connection automatically.
- Translatable Content: Standard WordPress posts and pages are natively translatable. If you are using ACF custom fields within a post or page, you only need to set the translation preferences for your ACF custom fields. However, if your ACF custom fields are utilized in custom post types, ensure that your custom post types are set as translatable.
- Translation Preferences: WPML Multilingual CMS plugin provides four different translation options for custom fields:a. Translate: This option makes your custom field values available for translation. It is suitable for text-based fields (e.g., Text, Text Area, WYSIWYG, Message).b. Copy: This option copies the field value from the default language into the secondary language(s), ensuring that your custom field values stay consistent across all languages. It is recommended for fields like Number, Range, True/False, and similar. Please note that when you use this option, the value of the field will not be available in WPML’s Advanced Translation Editor.
c. Copy Once: This option copies the value of the field from the default language initially, but the value of the field can be changed later within the WordPress native editor. After the initial copy, it will not be kept in synchronization with the default language. Similar to the “Copy” option, the value of the field is not available in WPML’s Advanced Translation Editor.
d. Don’t Translate: With this option, the field is not made available for translation. It is generally advisable to avoid using this option. For any custom fields you do not want to translate, you should choose the “Copy” option.
This setup allows you to efficiently translate content created with Advanced Custom Fields, ensuring that your site’s custom fields are multilingual and can reach a wider audience.