WPML
wpml_auto_translate_string_package
Type
filter
WPML Version
4.7.0

Description

This filter allows you to control the eligibility of string packages for automatic translation on a per-string package basis.

Arguments

$eligible
(boolean) (Required) The eligibility status for automatic translation.
$package
(array) (Required) The string package array.

Example usage

Example
// Disable translate everything for a specific string package.
add_filter( 'wpml_auto_translate_string_package', function( $eligible, $package ){
    if ( 'my-recipe' === $package['name'] && 'my-awesome-recipe' === $package['kind_slug'] ) {
        return false;
    }

    return $eligible;
} );

wpml_decode_custom_field, wpml_footer_language_selector, wpml_add_language_form_field, wpml_ls_exclude_in_menu, wpml_is_rtl, wpml_alternate_hreflang, wpml_head_langs, wpml_must_translate_canonical_url, wpml_browser_redirect_language_params, wpml_active_languages

All 29 Site-Wide Language Information hooks →