Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

No supporters are available to work today on this forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

This topic contains 2 replies, has 2 voices.

Last updated by paoloC-16 1 year ago.

Assigned support staff: Bigul.

Author Posts
October 15, 2019 at 6:34 pm #4759971


Tell us what you are trying to do? i wuold like to translate strings added with "code snippets wp plugin" but i can't find them. I read this other post: but my string are correctly inserted using "__(" so i should find them.

excerpt of my code:
$message = sprintf( __( 'Modified the authorization to the payment form for the user:' ) ) . "\r\n\r\n";
$message .= sprintf( __( 'Username: %s' ), $user->display_name ). "\r\n\r\n";
$message .= sprintf( __( 'Form Payment Authorization: %s' ), $user->abil_pag ) . "\r\n\r\n";
$message .= sprintf( __( '(Old Value) %s' ), $old_user_data ). "\r\n\r\n";
wp_mail( array($admin_email, $user->user_email), sprintf( __( 'User profile update: Enabling the payment form.' ), get_option('blogname') ), $message );

Code Snippets WP Plugin
hidden link

October 16, 2019 at 8:54 am #4763721


Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)


Welcome to the WPML support forum. I will do my best to help you to resolve the issue.

The code you are using is not compatible with the standard of WordPress localization. Please check with this documentation for more details

So please edit the code like the following and check you are getting the expected result or not.

$message = sprintf( __( 'Modified the authorization to the payment form for the user:','my-text-domain' ) ) . "\r\n\r\n";

It will help you to register the string for translation under *my-text-domain* strings domain.



October 17, 2019 at 11:27 am #4772945


My issue is resolved now. Thank you!