I updated my code above to include language tags. If you are already using the code, here are the changes.
In lang/english/main.php
Find:
?>
Before ADD:
//----------------------------------------------------------
//-- Mod Ajax Registration Checker --
//----------------------------------------------------------
$lang['ajax_username_empty'] = "Please enter a username";
$lang['ajax_username_length'] = "Username must be between 6 and 20 characters long";
$lang['ajax_username_taken'] = "This User name already exists";
$lang['ajax_username_good'] = "Username available to register";
$lang['ajax_password_empty'] = "Please enter a password";
$lang['ajax_password_length'] = "Password must be between 6 and 20 characters long";
$lang['ajax_password_good'] = "Password is good";
$lang['ajax_email_empty'] = "Please enter an email address";
$lang['ajax_email_invalid'] = "This email address is invalid!";
$lang['ajax_email_taken'] = "This email address is already registered";
$lang['ajax_email_good'] = "Email address is good to go";
In register.php
Find:
"captcha_registration" => (bool)$captcha_enable_registration
Replace with:
"captcha_registration" => (bool)$captcha_enable_registration,
"lang_ajax_username_empty" => $lang['ajax_username_empty'],
"lang_ajax_username_length" => $lang['ajax_username_length'],
"lang_ajax_username_taken" => $lang['ajax_username_taken'],
"lang_ajax_username_good" => $lang['ajax_username_good'],
"lang_ajax_password_empty" => $lang['ajax_password_empty'],
"lang_ajax_password_length" => $lang['ajax_password_length'],
"lang_ajax_password_good" => $lang['ajax_password_good'],
"lang_ajax_email_empty" => $lang['ajax_email_empty'],
"lang_ajax_email_invalid" => $lang['ajax_email_invalid'],
"lang_ajax_email_taken" => $lang['ajax_email_taken'],
"lang_ajax_email_good" => $lang['ajax_email_good']
And then once again replace the whole javascript in register_form.html with this:
<script language="javascript">
//<!---------------------------------+
// Developed by Roshan Bhattarai
// Visit http://roshanbh.com.np for this script and more.
// This notice MUST stay intact for legal use
// Extensive additions by Zhono
// --------------------------------->
$(document).ready(function()
{
var userOk = 0;
var passOk = 0;
var emailOk = 0;
$("#submitButton").attr("value", "Disabled");
$("#submitButton").attr("disabled", "true");
$("#username").blur(function()
{
//remove all the class add the messagebox classes and start fading
$("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
//check the username exists or not from ajax
$.post("{url_user_availability}",{ user_name:$(this).val() } ,function(data)
{
if(data=='userblank') //if username not entered
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_username_empty}').addClass('messageboxerror').fadeTo(900,1);
});
userOk = 0;
}
else if(data=='userlength') //if username is less than 6 or more than 20 characters
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_username_length}').addClass('messageboxerror').fadeTo(900,1);
});
userOk = 0;
}
else if(data=='userno') //if username not avaiable
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_username_taken}').addClass('messageboxerror').fadeTo(900,1);
});
userOk = 0;
}
else
{
$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_username_good}').addClass('messageboxok').fadeTo(900,1);
});
userOk = 1;
if (userOk==1 && passOk==1 && emailOk==1) {
$("#submitButton").attr("value", "Register");
$('#submitButton').removeAttr('disabled');
} else {
$("#submitButton").attr("disabled", "true");
$("#submitButton").attr("value", "Disabled");
}
}
});
});
$("#userpassword").blur(function()
{
//remove all the class add the messagebox classes and start fading
$("#msgboxpass").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
//check the username exists or not from ajax
$.post("{url_user_password}",{ user_password:$(this).val() } ,function(data)
{
if(data=='passblank') //if username not entered
{
$("#msgboxpass").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_password_empty}').addClass('messageboxerror').fadeTo(900,1);
});
passOk = 0;
}
else if(data=='passlength') //if username is less than 6 or more than 20 characters
{
$("#msgboxpass").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_password_length}').addClass('messageboxerror').fadeTo(900,1);
});
passOk = 0;
}
else
{
$("#msgboxpass").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_password_good}').addClass('messageboxok').fadeTo(900,1);
});
passOk = 1;
if (userOk==1 && passOk==1 && emailOk==1) {
$("#submitButton").attr("value", "Register");
$('#submitButton').removeAttr('disabled');
} else {
$("#submitButton").attr("disabled", "true");
$("#submitButton").attr("value", "Disabled");
}
}
});
});
$("#useremail").blur(function()
{
//remove all the class add the messagebox classes and start fading
$("#msgboxemail").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");
//check the username exists or not from ajax
$.post("{url_user_email}",{ user_email:$(this).val() } ,function(data)
{
if(data=='emailblank') //if username not entered
{
$("#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_email_empty}').addClass('messageboxerror').fadeTo(900,1);
});
emailOk = 0;
}
else if(data=='emailinvalid') //if username is less than 6 or more than 20 characters
{
$("#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_email_invalid}').addClass('messageboxerror').fadeTo(900,1);
});
emailOk = 0;
}
else if(data=='emailno') //if username not avaiable
{
$("#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_email_taken}').addClass('messageboxerror').fadeTo(900,1);
});
emailOk = 0;
}
else
{
$("#msgboxemail").fadeTo(200,0.1,function() //start fading the messagebox
{
//add message and change the class of the box and start fading
$(this).html('{lang_ajax_email_good}').addClass('messageboxok').fadeTo(900,1);
});
emailOk = 1;
if (userOk==1 && passOk==1 && emailOk==1) {
$("#submitButton").attr("value", "Register");
$('#submitButton').removeAttr('disabled');
} else {
$("#submitButton").attr("disabled", "true");
$("#submitButton").attr("value", "Disabled");
}
}
});
});
});
</script>
And then just edit the language tags to suit your needs, obviously.