Home › Toolset Professional Support › [Resolved] Translate Toolset form messages and apply to all forms
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Karachi (GMT+05:00)
Tagged: CRED API, Toolset Forms
Related documentation:
This topic contains 1 reply, has 2 voices.
Last updated by Waqar 2 years, 12 months ago.
Assisted by: Waqar.
Hi Kelvin,
Thank you for contacting us and I'd be happy to assist.
To translate/customize the form messages for all forms, you can use the filter 'cred_translate_action_message'.
For example:
function custom_callback_form_messages( $string ) { switch ( $string ) { case 'Post Saved' : $string = 'New message for Post Saved'; break; case 'The post was not saved because of the following problem:' : $string = 'New message for The post was not saved because of the following problem:'; break; } return $string; } add_filter( 'cred_translate_action_message', 'custom_callback_form_messages' );
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
In this example snippet, I've translated/customized the first two form messages and you can add more cases for the rest of the form messages, the same way.
regards,
Waqar