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

weglot_add_json_keys

With this filter you can add keys Weglot msut translate into a json content.

The filter receives an array of JSON keys (empty by default: name, description and HTML values are always translated) and must return it. The values of the keys you add are translated too.

add_filter( 'weglot_add_json_keys', 'custom_weglot_add_json_keys' );
function custom_weglot_add_json_keys( $keys ) {
    $keys[] = 'message';
    return $keys;
}

Last updated