For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to not translate specific ajax action

Weglot translates the response of admin-ajax actions by default. If a specific AJAX action should not be translated, add it to the list with the weglot_ajax_no_translate filter.

Example: excluding the loadmore ajax action

add_filter( 'weglot_ajax_no_translate', 'custom_ajax_no_translate', 10, 1 );
function custom_ajax_no_translate( $ajax_action ) {
    $ajax_action[] = 'loadmore';
    return $ajax_action;
}

Last updated