give_totals shortcode should work when using a multilingual plugin like Polylang
closed
Rick Alday
closed
Add this snippet to your site to display the [give_totals] from forms in different languages translated with Polylang:
add_filter( 'give_totals_goal_shortcode_query_args', 'give_polylang_total_goal_shortcode_agrs' );
function give_polylang_total_goal_shortcode_agrs( $args ) {
$args['lang'] = '';
return $args;
}
You can use a plugin like Code Snippets to implement this: https://wordpress.org/plugins/code-snippets/
R
Rik
R
Rik
Yes this is a problem for us too. We also use Polylang (the best translation plugin: WPML is dreadfully slow, and TranslatePress and Weglot have some unfortunate features, such as that when you change a section, you immediately need to translate it into all languages, otherwise the source language will be displayed. The plugins are unable to show the 'old translation' of the previous text).