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.
I totally agree. Never, never, ever hack the Drupal core and contributed modules. By hacking them, you lose
1. ability to update your site easily when security patches are released.
You always apply your own modifications every time you update your system.
2. the benefit of open source project.
Once you alter either the core or contributed modules, it is your system and no one knows what it exactly is. Therefore, no one may be able to help you in this forum or IRC channels when you have problems.
Again. Never hack the core and contributed modules.
There is also another way to do it with form_alter hook.
function modulename_form_alter ($form, &$form_state, $form_id) {
if ($form_id == 'user_login' || $form_id == 'user_login_block' ) {
$form['submit']['#value'] = 'Submit'; //change here whatever you want, I have updated it as Submit
}
Comments
login button
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'),
);
Thanks,
Vijay Thummar
---
Thanks a lot
Noooo don't change Drupal
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
Totally agreed.
I totally agree. Never, never, ever hack the Drupal core and contributed modules. By hacking them, you lose
1. ability to update your site easily when security patches are released.
You always apply your own modifications every time you update your system.
2. the benefit of open source project.
Once you alter either the core or contributed modules, it is your system and no one knows what it exactly is. Therefore, no one may be able to help you in this forum or IRC channels when you have problems.
Again. Never hack the core and contributed modules.
There is also another way to
There is also another way to do it with form_alter hook.
function modulename_form_alter ($form, &$form_state, $form_id) {
if ($form_id == 'user_login' || $form_id == 'user_login_block' ) {
$form['submit']['#value'] = 'Submit'; //change here whatever you want, I have updated it as Submit
}
}