Pass the language code when preloading (WPML, Polylang)

<?php

// Add the following
add_filter( 'facetwp_render_params', function( $params ) {
    if ( isset( $params['is_preload'] ) && defined( 'ICL_LANGUAGE_CODE' ) ) {
        $params['http_params']['lang'] = ICL_LANGUAGE_CODE;
    }
    return $params;
} );