Add the app_languages.php for the core/login and apply it to login.php

This commit is contained in:
Mark Crane
2013-01-05 09:33:49 +00:00
parent 07a772c0c6
commit 8efc516500
2 changed files with 22 additions and 9 deletions

View File

@@ -1,9 +1,14 @@
<?php
<?php
$content_users['label-username']['en-us'] = 'Username';
$content_users['label-username']['pt-pt'] = 'Nome de Utilizador';
$text['label-username']['en-us'] = 'Username';
$text['label-username']['pt-pt'] = 'Nome de Utilizador';
$content_users['label-password']['en-us'] = 'Password';
$content_users['label-password']['pt-pt'] = 'Palavra passe';
$text['label-password']['en-us'] = 'Password';
$text['label-password']['pt-pt'] = 'Palavra passe';
$text['label-domain']['en-us'] = 'Domain';
$text['label-domain']['pt-pt'] = '';
$text['button-login']['en-us'] = 'Login';
$text['button-login']['pt-pt'] = '';
?>

View File

@@ -26,6 +26,14 @@
include "root.php";
require_once "includes/require.php";
//add multi-lingual support
echo "<!--\n";
require_once "core/login/app_languages.php";
echo "-->\n";
foreach($text as $key => $value) {
$text[$key] = $value[$_SESSION['domain']['language']['code']];
}
//get the http values and set as variables
$path = check_str($_GET["path"]);
$msg = check_str($_GET["msg"]);
@@ -90,7 +98,7 @@ require_once "includes/require.php";
echo "<table width='200' border='0'>\n";
echo "<tr>\n";
echo "<td align='left'>\n";
echo " <strong>UserName:</strong>\n";
echo " <strong>".$text['label-username'].":</strong>\n";
echo "</td>\n";
echo "<td>\n";
echo " <input type=\"text\" style='width: 150px;' class='formfld' name=\"username\">\n";
@@ -99,7 +107,7 @@ require_once "includes/require.php";
echo "<tr>\n";
echo "<td align='left'>\n";
echo " <strong>Password:</strong>\n";
echo " <strong>".$text['label-password'].":</strong>\n";
echo "</td>\n";
echo "<td align='left'>\n";
echo " <input type=\"password\" style='width: 150px;' class='formfld' name=\"password\">\n";
@@ -109,7 +117,7 @@ require_once "includes/require.php";
if ($_SESSION['login']['domain_name.visible']['boolean'] == "true") {
echo "<tr>\n";
echo "<td align='left'>\n";
echo " <strong>Domain:</strong>\n";
echo " <strong>".$text['label-domain'].":</strong>\n";
echo "</td>\n";
echo "<td>\n";
if (count($_SESSION['login']['domain_name']) > 0) {
@@ -131,7 +139,7 @@ require_once "includes/require.php";
echo "<td>\n";
echo "</td>\n";
echo "<td align=\"right\">\n";
echo " <input type=\"submit\" class='btn' value=\"Login\">\n";
echo " <input type=\"submit\" class='btn' value=\"".$text['button-login']."\">\n";
echo "</td>\n";
echo "</tr>\n";
echo "</table>\n";