
-
AuthorPosts
-
June 5, 2025 at 8:43 am #1485109
Hi,
How can I fix the shown area on picture. I want to see that text in English but it automatically uses Turkish.
https://drive.google.com/file/d/13pA4OiR4apL6lFmwKH3RXoa_675Klofp/view?usp=sharingJune 6, 2025 at 6:32 am #1485138Hey inovatifglobaltr,
Thank you for the inquiry.
You can use this filter in the functions.php file to adjust the default label of the captcha.
function avia_contact_form_elements_mod( $form_fields ) { if ( isset( $form_fields['avia_age'] ) ) { $form_fields['avia_age']['label'] = __( 'Verify you are human', 'avia_framework' ); } return $form_fields; } add_filter( 'avia_contact_form_elements', 'avia_contact_form_elements_mod', 10, 1 );
Let us know the result.
Best regards,
IsmaelJune 10, 2025 at 1:58 pm #1485279Thanks Ismail,
Yes it is fixed. But this time, message is shown in English on the Turkish contact form page :)
Is it possible to edit this for each different contact form?-
This reply was modified 2 weeks, 3 days ago by
inovatifglobaltr.
June 11, 2025 at 7:22 am #1485310Hi,
Thank you for the update.
Are you using a translation plugin? You can try to use the following code instead to apply different labels for each language.
function avia_contact_form_elements_mod( $form_fields ) { if ( isset( $form_fields['avia_age'] ) ) { $lang = get_locale(); if ( $lang === 'tr_TR' ) { $form_fields['avia_age']['label'] = 'TRANSLATE THIS ONE TO tr_TR'; } else { $form_fields['avia_age']['label'] = 'Verify you are human'; } } return $form_fields; } add_filter( 'avia_contact_form_elements', 'avia_contact_form_elements_mod', 10, 1 );
If you’re using a translation plugin such as WPML or Polylang, you can use the following plugin to manually add translations for the new label.
— https://wordpress.org/plugins/loco-translate/
— https://wordpress.org/plugins/say-what/Best regards,
IsmaelJune 11, 2025 at 2:45 pm #1485329Hi,
I don’t use a translation plugin. There are only two different pages. I added the links.June 12, 2025 at 7:11 am #1485359Hi,
Thank you for the info. Try to replace the filter with this:
function avia_contact_form_elements_mod( $form_fields ) { if ( isset( $form_fields['avia_age'] ) ) { if ( is_page(266) ) { $form_fields['avia_age']['label'] = 'TRANSLATE THIS ONE TO tr_TR'; } elseif ( is_page(68) ) { $form_fields['avia_age']['label'] = 'Verify you are human'; } } return $form_fields; } add_filter( 'avia_contact_form_elements', 'avia_contact_form_elements_mod', 10, 1 );
Make sure to adjust the tr_TR label.
Best regards,
IsmaelJune 12, 2025 at 8:14 pm #1485376Thanks Ismail,
I got what I wanted but “tr_TR” is added to the end of the sentence :)https://drive.google.com/file/d/18HU7V8yl91bB9aTvM8cDhDB9CFmNuQ6V/view?usp=sharing
June 13, 2025 at 6:37 am #1485397Hi!
Did you remove the ” tr_TR” part from the label?
$form_fields['avia_age']['label'] = 'TRANSLATE THIS ONE TO tr_TR';
Best regards,
IsmaelJune 13, 2025 at 2:26 pm #1485429Hi,
My mistake :))
Thank you for your help.June 13, 2025 at 6:57 pm #1485447 -
This reply was modified 2 weeks, 3 days ago by
-
AuthorPosts
- You must be logged in to reply to this topic.