diff --git a/app/registrations/app_languages.php b/app/registrations/app_languages.php new file mode 100644 index 0000000000..92bae6d518 --- /dev/null +++ b/app/registrations/app_languages.php @@ -0,0 +1,38 @@ + + Portions created by the Initial Developer are Copyright (C) 2008-2012 + the Initial Developer. All Rights Reserved. + + Contributor(s): + Mark J Crane + James Rose +*/ + $text['error-event-socket']['en-us'] = 'Connection to Event Socket failed.'; + $text['label-message']['en-us'] = 'Message'; + $text['label-message']['en-us'] = 'Invalid Profile!'; + $text['button-back']['en-us'] = 'back'; + $text['label-domain']['en-us'] = 'Domain'; + $text['label-user']['en-us'] = 'User'; + $text['label-agent']['en-us'] = 'Agent'; + $text['label-ip']['en-us'] = 'IP'; + $text['label-port']['en-us'] = 'Port'; + $text['label-status']['en-us'] = 'Status'; + +?> \ No newline at end of file diff --git a/app/registrations/status_registrations.php b/app/registrations/status_registrations.php index dad37a7375..ea9c1383b1 100644 --- a/app/registrations/status_registrations.php +++ b/app/registrations/status_registrations.php @@ -22,6 +22,7 @@ Contributor(s): Mark J Crane + James Rose */ include "root.php"; require_once "includes/require.php"; @@ -36,6 +37,12 @@ require_once "includes/checkauth.php"; exit; } +//add multi-lingual support + require_once "app_languages.php"; + foreach($text as $key => $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; + } + //request form values and set them as variables $sip_profile_name = trim($_REQUEST["profile"]); @@ -47,7 +54,7 @@ require_once "includes/checkauth.php"; //create the event socket connection $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']); if (!$fp) { - $msg = "
Connection to Event Socket failed.
"; + $msg = "
".$text['error-event-socket']."
"; } //show the error message or show the content @@ -55,7 +62,7 @@ require_once "includes/checkauth.php"; echo "
\n"; echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -67,7 +74,7 @@ require_once "includes/checkauth.php"; //get sofia status profile information including registrations $cmd = "api sofia xmlstatus profile ".$sip_profile_name." reg"; $xml_response = trim(event_socket_request($fp, $cmd)); - if ($xml_response == "Invalid Profile!") { $xml_response = "Invalid Profile!"; } + if ($xml_response == "Invalid Profile!") { $xml_response = "".$text['label-message'].""; } $xml_response = str_replace("", "", $xml_response); $xml_response = str_replace("", "", $xml_response); try { @@ -125,7 +132,7 @@ require_once "includes/checkauth.php"; echo " Registrations: ".count($registrations)."\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Message".$text['label-message']."
$msg\n"; - echo " \n"; + echo " \n"; echo "
\n"; @@ -133,19 +140,19 @@ require_once "includes/checkauth.php"; echo "\n"; echo "\n"; if (count($_SESSION["domains"]) > 1) { - echo " \n"; + echo " \n"; } //echo " \n"; //echo " \n"; - echo " \n"; + echo " \n"; //echo " \n"; //echo " \n"; - echo " \n"; + echo " \n"; //echo " \n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; //echo " \n"; - echo " \n"; + echo " \n"; echo "\n"; //order the array
Domain".$text['label-domain']."UserCaller IDUser".$text['label-user']."Contactsip-auth-userAgent".$text['label-agent']."HostIPPort".$text['label-ip']."".$text['label-port']."mwi-accountStatus".$text['label-status']."