Polylang Compatibility

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

ACF Options Pages 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.

The module is also compatible with the ACF Options for Polylang plugin.

ACF Extended Modules

Dynamic Post Type, Taxonomy, Options Pages & Block Type items are automatically registered as Polylang strings, and can be translated using the Polylang String Translation module in Languages > Strings Translation menu.

Exclude Options

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

/*
 * Exclude Options Post ID
 * 
 * @array $exclude Array of options post ids to exclude
 */

add_filter('acfe/modules/multilang/exclude_options', 'my_acfe_exclude_options');
function my_acfe_exclude_options($exclude){

    $exclude[] = 'my-options';

    return $exclude;
    
}

Include Options

The Multilingual module will automatically include all ACF Options Pages & ACF Extended Post Types List, Post Types Archives & Taxonomies List, but if for some reason you would like to include an additional options Post ID, you can use the following hook:

/*
 * Include Options Post ID
 * 
 * @array $include Array of options post ids to include
 */

add_filter('acfe/modules/multilang/include_options', 'my_acfe_include_options');
function my_acfe_include_options($include){

    $include[] = 'my-options';

    return $include;
    
}

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);
    
}