Might not be an efficient way, but I don't get any other way to do that.
Here is a solution to keep a single Webform node with multilingual functionality:
Adding translated strings for each Webform element label not worked.
So I done something like that in form alter hook:
if(strpos($form_id, 'webform_client_form') !== false) {
$form['#submit'][] = 'gt_custom_contact_webform_submit';
$form['submitted']['your_name']['#title'] = t($form['submitted']['your_name']['#title']);
$form['submitted']['your_e_mail_address']['#title'] = t($form['submitted']['your_e_mail_address']['#title']);
$form['submitted']['subject']['#title'] = t($form['submitted']['subject']['#title']);
$form['submitted']['message']['#title'] = t($form['submitted']['message']['#title']);
$form['actions']['submit']['#value'] = t($form['actions']['submit']['#value']);
}
Add translated strings for each Webform element label from here:
/admin/config/regional/translate/translate
Now if you are using language switcher block, you will see it will not allow to change the language.
To solve that:
function gt_custom_menu() {
$items['contact-us'] = array(
'title callback' => 'gt_custom_contact_form_title',
'page callback' => 'gt_custom_contact_form',
'access callback' => true,
);
return $items;
}
function gt_custom_contact_form() {
return '';
}
function gt_custom_contact_form_title() {
return t('Contact us');
}
And make that Webform available into a block from here:
/node/nodeid/webform/configure
Advance settings -> Available as block
Now open block admin page, find that block, set Visibility settings to show that block on contact-us page only, make that block translatable using Make this block translatable.
Now language switcher block allow you to switch the languages.
And the main thing is Webform node will remain same.