WPML  Compatibility

Advanced Custom Fields comes with a WPML compatibility module for Fields, Field Groups & Options Page ID. However, it will only take care of Options Pages with the default options post id. When WPML is enabled, ACF will translate the post id to options_{lang}. ie: options_en.

ACF Extended adds a new layer of compatibility for WPML. ACF Options Pages and all ACF Extended Modules (Dynamic Post Type, Taxonomy, Options Pages, Block Type) are compatible.

ACF Options Pages with custom post id are automatically translated. Example: my-theme will become my-theme_en_US when switching language. If an Options Page was manually registered with a custom post id including a language code at the end, then the post id won’t be translated.

ACF Extended Modules

Dynamic Post Type, Taxonomy, Options Pages & Block Type items are automatically registered as WPML strings, and can be translated using the WPML String Translation module.

Allow/Disallow Options

It is possible to allow or disallow specific Options Post ID using the following hook:

/*
 * Multilang Options Post ID
 * 
 * @array $options_post_id Array of allowed post ids
 */

add_filter('acfe/modules/multilang/options', 'my_acfe_multilang_options');
function my_acfe_multilang_options($options_post_id){

    foreach($options_post_id as $k => $post_id){

        // Exclude "my-options" Post ID
        if($post_id === 'my-options'){
            unset($options_post_id[$k]);
        }

    }
    
    return $options_post_id;
    
}

Disable the module

The Multilingual module is enabled by default. It can be enabled and disabled in the Settings UIPRO, or with the following code:

// Using acf/init
add_action('acf/init', 'my_acfe_modules');
function my_acfe_modules(){

    // Disable Multilingual
    acf_update_setting('acfe/modules/multilang', false);
    
}

// Or using acfe/init
add_action('acfe/init', 'my_acfe_modules');
function my_acfe_modules(){
    
    // Disable Multilingual
    acfe_update_setting('modules/multilang', false);
    
}