My solution would be a small custom module.
Pros:
- Easy to tweak and install
- Lightweight, code based so you can just check it into VCS and deploy
- Can be extended for other language sets
Cons:
- Not scaleable.
- Requires a dev if you want to change the text
.info file:
name = User Registration Languages
description = Alter the user registration form to present alternative translations
core = 7.x
.module file
<?php
/**
* implements hook_form_FORM_ID_alter()
* https://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_form_FORM_ID_alter/7
*
* @param $form
* @param $state
*/
function userreglang_form_user_register_form_alter(&$form, &$state) {
// the arg() function returns a path component (zero based index)
// https://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/arg/7
// in this case we're looking for:
// user/register/{language_arg} e.g user/register/it
$lang = arg(2);
// uncomment the following if you want take a look at the form array prior to modification
// be sure to temporarily give the anonymous user role the ability to "Access developer information"
/*if(module_exists('devel')) {
dpm($form);
} // */
if($lang && $map = _userreglang_languages($lang)) {
$form['account']['name']['#title'] = $map['name'];
$form['account']['name']['#description'] = $map['name_desc'];
$form['account']['mail']['#title'] = $map['mail'];
$form['account']['mail']['#description'] = $map['mail_desc'];
$form['actions']['submit']['#value'] = $map['button'];
}
// uncomment the following if you want take a look at the form array after modification
/*if(module_exists('devel')) {
dpm($form);
} // */
}
/**
* helper function for different language maps you might have for the user registration form
*
* @param $lang
* @return array|null
*/
function _userreglang_languages($lang) {
$map = [
'it' => [
'name' => 'Your name, yo!',
'name_desc' => 'Input your username fool!',
'mail' => 'Email, you gots it?',
'mail_desc' => 'Seriously do you not know what email is?',
'button' => 'Click it baby!',
]
];
if(isset($map[$lang])) {
return $map[$lang];
}
else {
return null;
}
}