login button

henry4 - May 14, 2007 - 05:59

I want to change the spelling of login button that is there in the login box.is it possible?please help.

login button

vijaythummar - May 14, 2007 - 06:35

yes , you can change it.

Just go to user.module and then there is one function.

function user_login_block() {
$form = array(
'#action' => url($_GET['q'], drupal_get_destination()),
'#id' => 'user-login-form',
'#base' => 'user_login',
);
$form['name'] = array('#type' => 'textfield',
'#title' => t('Username'),
'#maxlength' => USERNAME_MAX_LENGTH,
'#size' => 15,
'#required' => TRUE,
);
$form['pass'] = array('#type' => 'password',
'#title' => t('Password'),
'#maxlength' => 60,
'#size' => 15,
'#required' => TRUE,
);
$form['submit'] = array('#type' => 'submit',
'#value' => t('Log in'),
);
$items = array();
if (variable_get('user_register', 1)) {
$items[] = l(t('Create new account'), 'user/register', array('title' => t('Create a new user account.')));
}
$items[] = l(t('Request new password'), 'user/password', array('title' => t('Request new password via e-mail.')));
$form['links'] = array('#value' => theme('item_list', $items));
return $form;
}

here change the value of submit button.
$form['submit'] = array('#type' => 'submit',
'#value' => t('Log in'),
);

---

henry4 - May 14, 2007 - 06:55

Thanks a lot

Noooo don't change Drupal

Ryan Palmer - July 2, 2008 - 05:13

Noooo don't change Drupal core!!! Bad advice!!

This text uses the translate function (http://api.drupal.org/api/function/t/5), which enables support for languages other than English. Alternatively, you can change strings of text, within English, to whatever you want.

Either turn on Locale module (built into Drupal) or try the string overrides module: http://drupal.org/project/stringoverrides

 
 

Drupal is a registered trademark of Dries Buytaert.