I have not been posting any fixes hacks for sometime due to the workload.
This is one I thought should be shared with you all:
How to get Gravity Forms to play nicely with qTranslate and translate the fields in your forms depending on what language your front end is at the time.
Problem is that not all the fields are translatable through the edit form are of Gravity Forms.
So here goes place this is your themes or child themes functions.php
add_action("loop_start", "qtrans_gravityform_filters");
function qtrans_gravityform_filters(){
add_filter("gform_name_first", "qtrans_gravityform_name_first");
add_filter("gform_name_last", "qtrans_gravityform_name_last");
add_filter("gform_name_suffix", "qtrans_gravityform_name_suffix");
add_filter("gform_address_street", "qtrans_gravityform_address_street");
add_filter("gform_address_street2", "qtrans_gravityform_address_street2");
add_filter("gform_address_city", "qtrans_gravityform_address_city");
add_filter("gform_address_state", "qtrans_gravityform_address_state");
add_filter("gform_address_zip", "qtrans_gravityform_address_zip");
add_filter("gform_address_country", "qtrans_gravityform_address_country");
}
function qtrans_gravityform_name_first($label){
return __('[ :en]Firstname[ :de]ingerman');
}
function qtrans_gravityform_name_last($label){
return __('[ :en]Surname[ :de]ingerman');
}
function qtrans_gravityform_name_suffix($label){
return __('[ :en]Suffix[ :de]ingerman');
}
function qtrans_gravityform_address_street($label){
return __('[ :en]Street[ :de]ingerman');
}
function qtrans_gravityform_address_street2($label){
return __('Street[ :de]ingerman');
}
function qtrans_gravityform_address_city($label){
return __('[ :en]City[ :de]ingerman');
}
function qtrans_gravityform_address_state($label){
return __('[ :en]County[ :de]ingerman');
}
function qtrans_gravityform_address_zip($label){
return __('[ :en]Postcode[ :de]ingerman');
}
function qtrans_gravityform_address_country($label){
return __('[ :en]Country[ :de]ingerman');
}
Don’t forget to change your lang tags to your respective languages and also to remove the space in between the [ and :





awesome, gonna try this now – certainly beats making a bunch of different forms
Pleased it helps..
This is it, all correct. Thank you for sharing this.
hello,
I tried but I do not work, I also tried changing “gform_name_first” with a class that I attribute to the field name but still does not work. you have any tips for me?
Valuable information. Fortunate me I found your web site unintentionally, and I am surprised why this accident didn’t happened earlier! I bookmarked it.