WPML

Panoramica del problema

In Happy Elementor Addons, alcuni testi dei widget non vengono inviati per la traduzione, quindi le pagine tradotte li mostrano nella lingua predefinita: i testi del repeater dei widget Image Stack Group, Photo Stack e Post Info, il testo e il link del pulsante Team Member e la descrizione di Image Hover Effect.

Soluzione alternativa

Fino a quando il team di HappyAddons non risolverà il problema:

  1. Esegui un backup completo del tuo sito prima di procedere.
  2. Aggiungi questo codice al file functions.php del tuo tema:
    add_filter( 'wpml_elementor_widgets_to_translate', function ( $widgets ) {
        if ( defined( 'HAPPY_ADDONS_DIR_PATH' ) ) {
            foreach ( array( 'image-stack-group', 'photo-stack', 'post-info' ) as $file ) {
                include_once HAPPY_ADDONS_DIR_PATH . 'wpml/' . $file . '.php';
            }
        }
        if ( isset( $widgets['ha-member']['fields'] ) ) {
            $widgets['ha-member']['fields'][] = array( 'field' => 'button_text', 'type' => 'Team Member: Button Text', 'editor_type' => 'LINE' );
            $widgets['ha-member']['fields']['button_link'] = array( 'field' => 'url', 'type' => 'Team Member: Button Link', 'editor_type' => 'LINK' );
        }
        if ( isset( $widgets['ha-image-hover-effect']['fields'] ) ) {
            $widgets['ha-image-hover-effect']['fields'][] = array( 'field' => 'hover_description', 'type' => 'Image Hover Effect: Description', 'editor_type' => 'AREA' );
        }
        return $widgets;
    }, 11 );
  3. Aggiorna le traduzioni delle tue pagine: i testi ora appaiono nell’Editor di traduzione.

Tutti i problemi noti

Hai bisogno di aiuto con questo problema?

Fai una richiesta di supporto e la esamineremo con te.