Hi there,

I use the "User registration guidelines" in /admin/user/settings on an i18n site. How can I translate these guidelines into other languages on my site?

Thanks a lot!

Comments

dimitrix’s picture

The easy way to solve this - write your own module with function yourmodulename_form_alter(&$form, $form_state, $form_id)
like this:

function yourmodulename_form_alter(&$form, $form_state, $form_id) {
  if('user_register' == $form_id){   
    $form['user_registration_help']['#value'] = t($form['user_registration_help']['#value']);            
  }
}

...and translate it like normal built-in interface

ColinMctavish’s picture

where do i put this? thanks

rahim123’s picture

Finally got it. By far the easiest and cleanest solution is here:
http://mrsimonelliott.com/blog/sending-user-emails-users-preferred-language

Basically, you have to define certain variables (such as registration guidelines, registration emails, etc.) as i18n translatable in settings.php

$conf['i18n_variables'] = array(
// Site name, slogan, mission, etc..
'site_name',
'site_slogan',
'site_mission',
'site_footer',
// User email variables
'user_mail_password_reset_body',
'user_mail_password_reset_subject',
'user_mail_register_admin_created_body',
'user_mail_register_admin_created_subject',
'user_mail_register_no_approval_required_body',
'user_mail_register_no_approval_required_subject',
'user_mail_register_pending_approval_body',
'user_mail_register_pending_approval_subject',
'user_mail_status_activated_body',
'user_mail_status_activated_subject',
'user_mail_status_blocked_body',
'user_mail_status_blocked_subject',
'user_mail_status_deleted_body',
'user_mail_status_deleted_subject',
'user_picture_guidelines',
'user_registration_help',
);

ColinMctavish’s picture

Thank you so much sb56637. Why can't everything be that easy? I appreciate it!

suffering drupal’s picture

@sb56637 nice of you to offer this help.
But I am kind of afraid to apply it, since my main experience with Drupal is that even with the smallest bit of change it is happy to get stuck or loose consistency (update a module, run the update script, run cron, rebuild permissions, etc, etc, etc...).

However, even harder to understand is why isn't this just in the CORE??? Isn't Drupal supposed to be an internationally oriented, multilanguage community building Content Managemente System??? The more we try to implement multilanguage options, the more we meet problems and the more we have the impression Drupal doesn't really have a multilanguage focus at all, as demonstrated for lacking a multilanguage sign-in/up to start with.

claude’s picture

i have translated the user registration e-mail notification messages , my default language is french, but registered users are still have e-mails in English. i tryed the module reglang , and still have the same problem.

Jose Reyero’s picture

Status: Active » Closed (fixed)
claude’s picture

Dear Jose Reyero, how come this is close and no one have replied to the problem , actually i still have the problem.

generalelektrix’s picture

Solution provided at post #3 adresses the problem. I successfully applied the changes to my settings.php file and am now able to translate the "User Registration Guidelines".

frandroid’s picture

Component: Miscellaneous » Strings
Status: Closed (fixed) » Needs work

That's a hack though. This text should be part of the translation interface by default.

ColinMctavish’s picture

agreed frandroid. But you are using an opensource cms. Half of my website is a hack.

Jose Reyero’s picture

Status: Needs work » Closed (fixed)

Reply is in #3, nothing else to do -at least for this module.

eigentor’s picture

In Drupal 7, there is the multilingual variables module inside i18n. You have to activate variables as translatable (similar to writing them into settings.php as described by sb56637 in #3).
You activate
http://screencast.com/t/e2RslxPZjg2y
then go to
http://screencast.com/t/4ovtD12MHaG
check all these boxes
http://screencast.com/t/z6M8akn5sK

What is a bit tricky is you have to save the welcome emails in english again also, else only your translation will be availabe. But at least you got a nice switch on every page you got multilingual variables enabled:
http://screencast.com/t/KN9WkeLJJz
And you got a description below each variable that is translatable
http://screencast.com/t/a5iLM8NdvSUp

I gues much has stayed the same except for being able to do everything through the UI now and these nice UI additions.