1

I've added a 'Term of use' read-only description into the Drupal user registration form, but I would like to make it multilingual. The corresponding code is in the begin of template.php (responsive is the theme name):

function responsive_form_alter(&$form, &$form_state, $form_id){
switch($form_id) { 
case 'user_register_form': // the value we stole from the rendered form 
$multi_regform = array(
'‪#‎type‬' => 'checkbox',
'‪#‎title‬' => t("Elfogadom a moderálási elveket"),
'‪#‎description‬' => t("A Magyar Térinformatikai Társaság (HUNAGI) hivatalos honlapján való publikálás és kommentelés lehetőségét a HUNAGI regisztrált tagjai ..... A közzététellel a regisztrált felhasználó lemond a bejegyzés feletti rendelkezés jogáról, későbbiekben anyagi vagy más jellegű követeléseket ezekre alapozva nem támaszthat. - A HUNAGI vezetősége - "),
'‪#‎required‬' => TRUE,
'‪#‎localize‬' => TRUE, // Does not function...
'‪#‎weight‬' => 1, // Adjust so that you can place it whereever 
);
$form['terms_of_use'] = $multi_regform;
break; 
} 
}

You can check it here: http://hunagi.hu/hu/user/register

Now the text is Hungarian, can I add an English one someway?

ps: I've already tried this by Field addition by Field Group, Field Permissions modules, that did not work.

1

You should be able to translate your strings at admin/config/regional/translate/translate, just search a word contained in the two hungarian strings (case sensitive!), click on the edit link of the relevant string and you should be done.

1
  • hmm, I've found the text and added some text in other languages, but it doesn't appear : ( – pnz Aug 20 '15 at 10:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.