Translating default fields does not work
-
Hello @aurovrata
I hope you are doing well.
First of all thank you for this amazing plugin.I have an issue with translating the fields. I add the code you provide but nothing changes. The fields are not translated.
By the way, there are two syntax errors in the code. I don’t read code. Somebody noticed this for me as I got an error when trying to save.
Syntax error 1: The first field is missing a ; at the end of the first line
Syntax error 2: The fourth field is missing a ; at the end of the fourth line.This is the code I am talking about (For translating the fields)
add_filter(‘cf7_google_map_address_label’, ‘change_address_label’,10,2)
function change_address_label($label, $field_name){
if(‘your-location’==$field_name){
$label = ‘Adresse’;
}
return $label;
}
add_filter(‘cf7_google_map_city_label’, ‘change_city_label’,10,2)
function change_city_label($label, $field_name){
if(‘your-location’==$field_name){
$label = ‘Ville’;
}
return $label;
}
add_filter(‘cf7_google_map_pincode_label’, ‘change_pincode_label’,10,2)
function change_pincode_label($label, $field_name){
if(‘your-location’==$field_name){
$label = ‘Code postal’;
}
return $label;
}
add_filter(‘cf7_google_map_country_label’, ‘change_country_label’,10,2)
function change_country_label($label, $field_name){
if(‘your-location’==$field_name){
$label = ‘Pays’
}
return $label;
}`But regardless of this, it still does not translate the fields. Nothing happens in the front-end.
Thank you in advance
Vassos
- The topic ‘Translating default fields does not work’ is closed to new replies.