Home › Toolset Professional Support › [Resolved] How to translate all messages from the user 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.
Our next available supporter will start replying to tickets in about 6.88 hours from now. Thank you for your understanding.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10: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/Kolkata (GMT+05:30)
This topic contains 3 replies, has 2 voices.
Last updated by Minesh 1 month, 3 weeks ago.
Assisted by: Minesh.
I have created a custom code like it is told in this thread, https://toolset.com/forums/topic/translate-toolset-form-messages-and-apply-to-all-forms/. The code looks like this:
function custom_callback_form_messages( $string ) { switch ( $string ) { case 'User Saved' : $string = 'Gebruiker opgeslagen'; break; case 'User not saved' : $string = 'Gebruiker niet opgeslagen (één probleem)'; break; case 'User not saved due to several problems' : $string = 'Gebruiker niet opgeslagen (meerdere problemen)'; break; case 'Invalid submission' : $string = 'Ongeldige indiening'; break; case 'User updated' : $string = 'Gebruiker bijgewerkt'; break; case 'User not updated' : $string = 'Gebruiker niet bijgewerkt (één probleem)'; break; case 'User not updated due to several problems' : $string = 'Gebruiker niet bijgewerkt (meerdere problemen)'; break; case 'Form submitted successfully' : $string = 'Formulier succesvol ingediend'; break; case 'Form submission failed' : $string = 'Indiening van formulier mislukt'; break; case 'Invalid data' : $string = 'Ongeldige gegevens'; break; case 'Missing required fields' : $string = 'Vereiste velden ontbreken'; break; case 'Form has been reset' : $string = 'Formulier is opnieuw ingesteld'; break; case 'Captcha validation failed' : $string = 'Captcha-validatie mislukt'; break; case 'Thank you for your submission' : $string = 'Bedankt voor uw indiening'; break; case 'Your changes have been saved' : $string = 'Uw wijzigingen zijn opgeslagen'; break; case 'Required field message' : $string = '<strong>Dit veld is verplicht!</strong>'; break; case 'Invalid username message' : $string = 'De gebruikersnaam mag alleen alfanumerieke karakters, spaties, -, _, . of @ bevatten'; break; case 'Passwords do not match' : $string = 'Wachtwoorden komen niet overeen'; break; case 'Invalid date message' : $string = 'Voer een geldige datum in'; break; case 'Invalid hidden field value message' : $string = 'Veldwaarden komen niet overeen'; break; case 'Invalid email message' : $string = 'Ongeldig e-mailadres'; break; case 'Invalid color picker message' : $string = 'Gebruik een geldige hexadecimale waarde'; break; case 'Invalid numeric field message' : $string = 'Voer numerieke gegevens in'; break; case 'Invalid URL message' : $string = 'Voer een geldig URL-adres in'; break; case 'Email already exists message' : $string = 'Sorry, dit e-mailadres is al in gebruik!'; break; case 'Username already exists message' : $string = 'Sorry, deze gebruikersnaam bestaat al!'; break; case 'Invalid Editing User Role' : $string = 'Dit formulier kan geen gebruikers met de rol van %%EDITED_USER_ROLE%% bewerken'; break; case 'Invalid captcha message' : $string = 'Verkeerde CAPTCHA'; break; case 'Missing captcha message' : $string = 'Missende CAPTCHA'; break; case 'Show captcha button' : $string = 'Toon CAPTCHA'; break; case 'Edit skype button' : $string = 'Bewerk Skype-knop'; break; case 'Invalid image message' : $string = 'Niet geldig afbeeldingsformaat'; break; case 'Invalid file type message' : $string = 'Bestandstype niet toegestaan'; break; case 'Invalid image width message' : $string = 'Afbeeldingsbreedte groter dan %dpx'; break; case 'Invalid image height message' : $string = 'Afbeelding hoogte groter dan %dpx'; break; case 'Taxonomy show popular message' : $string = 'Toon populair'; break; case 'Taxonomy hide popular message' : $string = 'Verberg populair'; break; case 'Add taxonomy term' : $string = 'Toevoegen'; break; case 'Remove taxonomy term' : $string = 'Verwijderen'; break; case 'Add new taxonomy message' : $string = 'Nieuwe taxonomie toevoegen'; break; // Add more messages as needed } return $string; } add_filter( 'cred_translate_action_message', 'custom_callback_form_messages' );
I placed it in the settings/custom code, hidden link and set it to Active.
It is not working in my forms, see this image hidden link.
How can I make it so that this will work?
Cheers
Marco
Hello. Thank you for contacting the Toolset support.
Well - those message translation you will see on frontend.
So, for example, you added the Toolset user form you created to create new user.
When a new user created using Toolset user form from frontend, you will see a message "Gebruiker opgeslagen" instead of User Saved.
Hi Minesh,
Ok, so you won't see it in the backend.
Other tranlation question, where can I translate --- not set --- and Please validate reCAPTCHA?
Cheers
Marco
New threads created by Minesh and linked to this one are listed below:
As the original question is already addressed with this ticket.
As per our support policy we entertain only one question per ticket. This will help other users searching on the forum as well as help us to write correct problem resolution summery for the original issue reported.
I've split the ticket with your new question here:
- https://toolset.com/forums/topic/split-how-to-translate-all-messages-from-the-user-forms-how-to-translate-not-set/
You're welcome to mark resolve this ticket.