From e1a3d90cfea8a2d708cf9b96c07c276d9c092cbd Mon Sep 17 00:00:00 2001 From: Nuno Miguel Reis Date: Sat, 6 Oct 2012 18:00:11 +0000 Subject: [PATCH] start of translation to portuguese from Portugal (pt-pt) --- app/calls/app_languages.php | 90 +++++++++++++ app/calls/v_call_edit.php | 61 ++++----- app/calls/v_calls.php | 25 ++-- app/calls_active/app_languages.php | 38 ++++++ app/calls_active/v_calls_active.php | 9 +- .../v_calls_active_extensions.php | 33 ++--- app/fax/fax.php | 1 + app/users/app_languages.php | 65 ++++++++++ app/users/usersupdate.php | 61 +++++---- app/voicemail_greetings/app_languages.php | 69 ++++++++++ .../v_voicemail_greetings.php | 25 ++-- .../v_voicemail_greetings_delete.php | 7 +- .../v_voicemail_greetings_edit.php | 27 ++-- app/voicemail_msgs/app_languages.php | 119 ++++++++++++++++++ app/voicemail_msgs/v_voicemail_msgs.php | 32 ++--- .../v_voicemail_msgs_delete.php | 15 ++- .../v_voicemail_msgs_password.php | 35 +++--- app/voicemail_msgs/v_voicemail_msgs_play.php | 9 +- app_languages.php | 33 +++++ index2.php | 17 +-- install.php | 2 +- 21 files changed, 626 insertions(+), 147 deletions(-) create mode 100644 app/calls/app_languages.php create mode 100644 app/calls_active/app_languages.php create mode 100644 app/users/app_languages.php create mode 100644 app/voicemail_greetings/app_languages.php create mode 100644 app/voicemail_msgs/app_languages.php create mode 100644 app_languages.php diff --git a/app/calls/app_languages.php b/app/calls/app_languages.php new file mode 100644 index 0000000000..ad0db83724 --- /dev/null +++ b/app/calls/app_languages.php @@ -0,0 +1,90 @@ + diff --git a/app/calls/v_call_edit.php b/app/calls/v_call_edit.php index 32b0bf4617..b7711d7da4 100644 --- a/app/calls/v_call_edit.php +++ b/app/calls/v_call_edit.php @@ -26,6 +26,7 @@ require_once "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +require_once "app_languages.php"; if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) { //access granted } @@ -33,6 +34,10 @@ else { echo "access denied"; exit; } + + foreach($content_calls as $key => $value) { + $content_calls[$key] = $value[$_SESSION['domain']['language']['code']]; + } //define the destination_select function function destination_select($select_name, $select_value, $select_default) { @@ -384,7 +389,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { require_once "includes/header.php"; echo "\n"; echo "
\n"; - echo "Update Complete
\n"; + echo "".$content_calls['confirm-update']."
\n"; echo "
\n"; require_once "includes/footer.php"; return; @@ -491,21 +496,21 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { 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"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -738,7 +743,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update") { echo " \n"; } - echo " \n"; + echo " \n"; echo " \n"; echo " "; echo "
\n"; - echo " Calls\n"; + echo " ".$content_calls['title']."\n"; echo "\n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo " Directs incoming calls for extension $extension.

\n"; + echo " ".$content_calls['description']." $extension.

\n"; echo "
\n"; - echo " Call Forward:\n"; + echo " ".$content_calls['lable-callforward'].":\n"; echo "\n"; $on_click = "document.getElementById('follow_me_enabled').checked=true;"; @@ -513,16 +518,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $on_click .= "document.getElementById('dnd_enabled').checked=false;"; $on_click .= "document.getElementById('dnd_disabled').checked=true;"; if ($call_forward_enabled == "true") { - echo " Enabled \n"; + echo " ".$content_calls['lable-enabled']." \n"; } else { - echo " Enable \n"; + echo " ".$content_calls['lable-enable']." \n"; } if ($call_forward_enabled == "false" || $call_forward_enabled == "") { - echo " Disabled \n"; + echo " ".$content_calls['lable-disabled']." \n"; } else { - echo " Disable \n"; + echo " ".$content_calls['lable-disable']." \n"; } unset($on_click); echo "
\n"; @@ -533,7 +538,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Number:\n"; + echo " ".$content_calls['lable-number'].":\n"; echo "\n"; echo " \n"; @@ -550,7 +555,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Follow Me:\n"; + echo " ".$content_calls['lable-followme'].":\n"; echo "\n"; $on_click = "document.getElementById('call_forward_enabled').checked=true;"; @@ -558,16 +563,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $on_click .= "document.getElementById('dnd_enabled').checked=false;"; $on_click .= "document.getElementById('dnd_disabled').checked=true;"; if ($follow_me_enabled == "true") { - echo " Enabled \n"; + echo " ".$content_calls['lable-enabled']." \n"; } else { - echo " Enable \n"; + echo " ".$content_calls['lable-enable']." \n"; } if ($follow_me_enabled == "false" || $follow_me_enabled == "") { - echo " Disabled \n"; + echo " ".$content_calls['lable-disabled']." \n"; } else { - echo " Disable \n"; + echo " ".$content_calls['lable-disable']." \n"; } unset($on_click); echo "
\n"; @@ -577,7 +582,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Ring 1st Number:\n"; + echo " ".$content_calls['lable-ring1'].":\n"; echo "\n"; echo " \n"; @@ -590,7 +595,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Ring 2nd Number:\n"; + echo " ".$content_calls['lable-ring2'].":\n"; echo "\n"; echo " \n"; @@ -603,7 +608,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Ring 3rd Number:\n"; + echo " ".$content_calls['lable-ring3'].":\n"; echo "\n"; echo " \n"; @@ -616,7 +621,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Ring 4th Number:\n"; + echo " ".$content_calls['lable-ring4'].":\n"; echo "\n"; echo " \n"; @@ -629,7 +634,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Ring 5th Number:\n"; + echo " ".$content_calls['lable-ring5'].":\n"; echo "\n"; echo " \n"; @@ -642,7 +647,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Ring Order:\n"; + echo " ".$content_calls['lable-ringorder'].":\n"; echo "\n"; echo "
\n"; - echo " Prompt to accept the call:\n"; + echo " ".$content_calls['lable-prompt'].":\n"; echo "\n"; echo "
\n"; - echo " Do Not Disturb:\n"; + echo " ".$content_calls['lable-dnd'].":\n"; echo "\n"; $on_click = "document.getElementById('call_forward_enabled').checked=true;"; @@ -706,16 +711,16 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { $on_click .= "document.getElementById('follow_me_enabled').checked=true;"; $on_click .= "document.getElementById('follow_me_disabled').checked=true;"; if ($dnd_enabled == "true") { - echo " Enabled \n"; + echo " ".$content_calls['lable-enabled']." \n"; } else { - echo " Enable \n"; + echo " ".$content_calls['lable-enable']." \n"; } if ($dnd_enabled == "false" || $dnd_enabled == "") { - echo " Disabled \n"; + echo " ".$content_calls['lable-disabled']." \n"; } else { - echo " Disable \n"; + echo " ".$content_calls['lable-disable']." \n"; } echo "
\n"; echo "
"; diff --git a/app/calls/v_calls.php b/app/calls/v_calls.php index d0b1d39937..b376e91618 100644 --- a/app/calls/v_calls.php +++ b/app/calls/v_calls.php @@ -26,6 +26,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +include "app_languages.php"; if (permission_exists('follow_me') || permission_exists('call_forward') || permission_exists('do_not_disturb')) { //access granted } @@ -37,7 +38,11 @@ require_once "includes/header.php"; require_once "includes/paging.php"; $order_by = $_GET["order_by"]; -$order = $_GET["order"]; +$order = $_GET["order"]; + + foreach($content_calls as $key => $value) { + $content_calls[$key] = $value[$_SESSION['domain']['language']['code']]; + } echo "
"; echo "\n"; @@ -48,9 +53,9 @@ $order = $_GET["order"]; if ($is_included != "true") { echo "
\n"; echo " \n"; - echo " \n"; echo " \n"; echo "
Calls
\n"; - echo " Use the links to configure call forward follow me, or do no disturb.\n"; - echo " The following list the extensions that have been assigned to this user account. \n"; + echo "
".$content_calls['title']."
\n"; + echo " ".$content_calls['description2']."\n"; + echo " ".$content_calls['description3']." \n"; echo "
\n"; @@ -133,9 +138,9 @@ $order = $_GET["order"]; echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo "\n"; + echo "\n"; + echo "\n"; + echo "\n"; echo "\n"; if ($result_count > 0) { @@ -144,15 +149,15 @@ $order = $_GET["order"]; echo " \n"; echo " \n"; echo " \n"; diff --git a/app/calls_active/app_languages.php b/app/calls_active/app_languages.php new file mode 100644 index 0000000000..04a0829c35 --- /dev/null +++ b/app/calls_active/app_languages.php @@ -0,0 +1,38 @@ + diff --git a/app/calls_active/v_calls_active.php b/app/calls_active/v_calls_active.php index 0c6f988269..935b21a86b 100644 --- a/app/calls_active/v_calls_active.php +++ b/app/calls_active/v_calls_active.php @@ -26,6 +26,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +include "app_languages.php"; if (permission_exists('calls_active_view')) { //access granted } @@ -34,6 +35,10 @@ else { exit; } + foreach($content_calls_active as $key => $value) { + $content_calls_active[$key] = $value[$_SESSION['domain']['language']['code']]; + } + $conference_name = trim($_REQUEST["c"]); $tmp_conference_name = str_replace("_", " ", $conference_name); @@ -110,8 +115,8 @@ echo "
"; echo "
ExtensionToolsDescription".$content_calls['table-extension']."".$content_calls['table-tools']."".$content_calls['table-description']."
".$row['extension']."\n"; if (permission_exists('call_forward')) { - echo " Call Forward \n"; + echo " ".$content_calls['lable-callforward']." \n"; echo "   \n"; } if (permission_exists('follow_me')) { - echo " Follow Me \n"; + echo " ".$content_calls['lable-followme']." \n"; echo "   \n"; } if (permission_exists('do_not_disturb')) { - echo " Do Not Disturb \n"; + echo " ".$content_calls['lable-dnd']." \n"; } echo " ".$row['description']." 
\n"; echo " \n"; -echo " \n"; echo "
Active Calls
\n"; -echo " Use this to monitor and interact with the active calls.\n"; +echo "
".$content_calls_active['title']."
\n"; +echo " ".$content_calls_active['description']."\n"; echo "
\n"; diff --git a/app/calls_active/v_calls_active_extensions.php b/app/calls_active/v_calls_active_extensions.php index 251cf3c8a1..20ceaa592b 100644 --- a/app/calls_active/v_calls_active_extensions.php +++ b/app/calls_active/v_calls_active_extensions.php @@ -26,6 +26,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +include "app_languages.php"; if (permission_exists('extensions_active_view')) { //access granted } @@ -34,6 +35,10 @@ else { exit; } + foreach($content_calls_active as $key => $value) { + $content_calls_active[$key] = $value[$_SESSION['domain']['language']['code']]; + } + //http get and set variables $event_type = $_GET['event_type']; //open_window //iframe if ($event_type=="iframe") { @@ -201,7 +206,7 @@ echo "
"; echo "\n"; echo " \n"; echo " \n"; //get the user status when the page loads @@ -228,40 +233,40 @@ else { echo " \n"; @@ -269,13 +274,13 @@ else { echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
\n"; -echo " Active Extensions
\n"; +echo " ".$content_calls_active['title2']."
\n"; echo "
\n"; //status list echo "  "; - echo " Status \n"; + echo " ".$content_calls_active['label-status']." \n"; $cmd = "'v_calls_exec.php?action=user_status&data='+this.value+'"; $cmd .= "&cmd=callcenter_config+agent+set+status+".$_SESSION['username']."@".$_SESSION['domain_name']."+'+this.value"; echo " \n"; echo " \n"; echo "  "; -echo " Transfer To\n"; +echo " ".$content_calls_active['label-transfer']."\n"; echo " \n"; echo "
\n"; -echo " Use this to view all extensions and monitor and interact with active calls.\n"; +echo " ".$content_calls_active['description2']."\n"; echo "
\n"; diff --git a/app/fax/fax.php b/app/fax/fax.php index 7a226638d5..a024ae8fcb 100644 --- a/app/fax/fax.php +++ b/app/fax/fax.php @@ -26,6 +26,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; + if (permission_exists('fax_extension_view')) { //access granted } diff --git a/app/users/app_languages.php b/app/users/app_languages.php new file mode 100644 index 0000000000..f7a06084a9 --- /dev/null +++ b/app/users/app_languages.php @@ -0,0 +1,65 @@ + diff --git a/app/users/usersupdate.php b/app/users/usersupdate.php index cb5f3431af..7cf2bf1a15 100644 --- a/app/users/usersupdate.php +++ b/app/users/usersupdate.php @@ -26,6 +26,8 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +include "app_languages.php"; + if (permission_exists("user_account_settings_view")) { //access granted } @@ -34,6 +36,11 @@ else { return; } + + foreach($contentusers as $key => $value) { + $contentusers[$key] = $value[$_SESSION['domain']['language']['code']]; + } + //set the username from v_users $username = $_SESSION["username"]; $user_uuid = $_SESSION["user_uuid"]; @@ -80,7 +87,7 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") { $msg = ''; //if (strlen($password) == 0) { $msg .= "Password cannot be blank.
\n"; } - if ($password != $confirm_password) { $msg .= "Passwords did not match.
\n"; } + if ($password != $confirm_password) { $msg .= "".$contentusers['confirm-password']."
\n"; } //if (strlen($user_time_zone) == 0) { $msg .= "Please provide an time zone.
\n"; } if (strlen($msg) > 0) { @@ -191,7 +198,7 @@ if (count($_POST)>0 && $_POST["persistform"] != "1") { //redirect the browser require_once "includes/header.php"; echo "\n"; - echo "
Update Complete
"; + echo "
".$contentusers['confirm-update']."
"; require_once "includes/footer.php"; return; } @@ -226,15 +233,15 @@ else { echo "
\n"; echo ""; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
Account Settings".$contentusers['title']."\n"; - echo " "; - echo " "; + echo " "; + echo " "; echo "
\n"; - echo " Edit account information. \n"; + echo " ".$contentusers['description']." \n"; echo "
\n"; @@ -243,20 +250,20 @@ else { echo ""; echo "\n"; - echo " \n"; + echo " \n"; echo "\n"; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; echo " "; - echo " "; + echo " "; echo " "; echo " "; @@ -268,7 +275,7 @@ else { echo "
User Info".$contentusers['table-title']."
Username:".$contentusers['label-username'].":$username
Password:".$contentusers['label-password'].":
Confirm Password:".$contentusers['label-confirmpassword'].":
"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; if ($_SESSION['user_status_display'] == "false") { @@ -277,44 +284,44 @@ else { else { echo " \n"; echo " \n"; echo " \n"; echo " \n"; } @@ -355,7 +362,7 @@ else { echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
Additional Info".$contentusers['table2-title']."
\n"; - echo " Status:\n"; + echo " ".$contentusers['label-status'].":\n"; echo " \n"; echo " \n"; echo "
\n"; - echo " Select a the user status.
\n"; + echo " ".$contentusers['label-infostatus']."
\n"; echo "
\n"; - echo " Time Zone: \n"; + echo " ".$contentusers['label-time'].": \n"; echo " \n"; echo " \n"; echo "
\n"; - echo " Select the default time zone.
\n"; + echo " ".$contentusers['label-infotime']."
\n"; echo "
"; @@ -394,7 +401,7 @@ else { echo ""; echo " "; echo " "; echo " "; echo "
"; - echo " "; + echo " "; echo "
"; @@ -408,4 +415,4 @@ else { //include the footer require_once "includes/footer.php"; -?> \ No newline at end of file +?> diff --git a/app/voicemail_greetings/app_languages.php b/app/voicemail_greetings/app_languages.php new file mode 100644 index 0000000000..6dcca49e69 --- /dev/null +++ b/app/voicemail_greetings/app_languages.php @@ -0,0 +1,69 @@ + diff --git a/app/voicemail_greetings/v_voicemail_greetings.php b/app/voicemail_greetings/v_voicemail_greetings.php index 9d24da2a69..9bf1216f5a 100644 --- a/app/voicemail_greetings/v_voicemail_greetings.php +++ b/app/voicemail_greetings/v_voicemail_greetings.php @@ -26,6 +26,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +require_once "app_languages.php"; if (permission_exists('voicemail_greetings_view')) { //access granted } @@ -34,6 +35,10 @@ else { exit; } + foreach($contentvoicemail_greetings as $key => $value) { + $contentvoicemail_greetings[$key] = $value[$_SESSION['domain']['language']['code']]; + } + require_once "includes/paging.php"; //set the max php execution time @@ -221,20 +226,20 @@ require_once "includes/paging.php"; echo "\n"; echo " \n"; echo " "; echo " \n"; echo " "; echo " "; echo " \n"; echo " \n"; echo "
\n"; - echo " Voicemail Greetings:
\n"; + echo " ".$contentvoicemail_greetings['title'].":
\n"; echo "
\n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo "    \n"; - echo " \n"; + echo " \n"; echo "
\n"; - echo " Select the active greeting message to play for extension $user_id.
\n"; + echo " ".$contentvoicemail_greetings['description']." $user_id.
\n"; echo "
\n"; @@ -310,11 +315,11 @@ require_once "includes/paging.php"; echo "\n"; echo "\n"; - echo "\n"; - echo th_order_by('greeting_name', 'Name', $order_by, $order); - echo "\n"; - echo "\n"; - echo th_order_by('greeting_description', 'Description', $order_by, $order); + echo "\n"; + echo th_order_by('greeting_name', $contentvoicemail_greetings['table-name'], $order_by, $order); + echo "\n"; + echo "\n"; + echo th_order_by('greeting_description', $contentvoicemail_greetings['table-description'], $order_by, $order); echo "\n"; if ($action == "add") { - echo "\n"; + echo "\n"; } if ($action == "update") { - 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"; @@ -221,7 +226,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo " \n"; } echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " "; echo "
ChooseDownloadSize".$contentvoicemail_greetings['table-choose']."".$contentvoicemail_greetings['table-download']."".$contentvoicemail_greetings['table-size']."\n"; //if (permission_exists('voicemail_greetings_add')) { // echo " $v_link_label_add\n"; diff --git a/app/voicemail_greetings/v_voicemail_greetings_delete.php b/app/voicemail_greetings/v_voicemail_greetings_delete.php index befe1b3f2f..1cad2d1095 100644 --- a/app/voicemail_greetings/v_voicemail_greetings_delete.php +++ b/app/voicemail_greetings/v_voicemail_greetings_delete.php @@ -26,6 +26,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +require_once "app_languages.php"; if (permission_exists('voicemail_greetings_delete')) { //access granted } @@ -34,6 +35,10 @@ else { exit; } + foreach($contentvoicemail_greetings as $key => $value) { + $contentvoicemail_greetings[$key] = $value[$_SESSION['domain']['language']['code']]; + } + if (count($_GET)>0) { $id = $_GET["id"]; $user_id = $_GET["user_id"]; @@ -76,7 +81,7 @@ if (strlen($id)>0) { require_once "includes/header.php"; echo "\n"; echo "
\n"; - echo "Delete Complete\n"; + echo "".$contentvoicemail_greetings['confirm-delete2']."\n"; echo "
\n"; require_once "includes/footer.php"; return; diff --git a/app/voicemail_greetings/v_voicemail_greetings_edit.php b/app/voicemail_greetings/v_voicemail_greetings_edit.php index f72192f104..4d053c900d 100644 --- a/app/voicemail_greetings/v_voicemail_greetings_edit.php +++ b/app/voicemail_greetings/v_voicemail_greetings_edit.php @@ -26,6 +26,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +require_once "app_languages.php"; if (permission_exists('voicemail_greetings_add') || permission_exists('voicemail_greetings_edit')) { //access granted } @@ -34,6 +35,10 @@ else { exit; } + foreach($contentvoicemail_greetings as $key => $value) { + $contentvoicemail_greetings[$key] = $value[$_SESSION['domain']['language']['code']]; + } + //set the action as an add or an update if (isset($_REQUEST["id"])) { $action = "update"; @@ -63,7 +68,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //check for all required data //if (strlen($domain_uuid) == 0) { $msg .= "Please provide: domain_uuid
\n"; } - if (strlen($greeting_name) == 0) { $msg .= "Please provide: Greeting Name (play)
\n"; } + if (strlen($greeting_name) == 0) { $msg .= "".$contentvoicemail_greetings['confirm-name']."
\n"; } //if (strlen($greeting_description) == 0) { $msg .= "Please provide: Description
\n"; } if (strlen($msg) > 0 && strlen($_POST["persistformvar"]) == 0) { require_once "includes/header.php"; @@ -102,7 +107,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { require_once "includes/header.php"; echo "\n"; echo "
\n"; - echo "Add Complete\n"; + echo "".$contentvoicemail_greetings['confirm-add']."\n"; echo "
\n"; require_once "includes/footer.php"; return; @@ -143,7 +148,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { require_once "includes/header.php"; echo "\n"; echo "
\n"; - echo "Update Complete\n"; + echo "".$contentvoicemail_greetings['confirm-update']."\n"; echo "
\n"; require_once "includes/footer.php"; return; @@ -186,33 +191,33 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
Add Greeting".$contentvoicemail_greetings['label-add']."Edit Greeting".$contentvoicemail_greetings['label-edit']['en-us']."
\n"; - echo " Greeting Name:\n"; + echo " ".$contentvoicemail_greetings['label-name'].":\n"; echo "\n"; echo " \n"; echo "
\n"; - echo "Greeting Name. example: greeting_x\n"; + echo "".$contentvoicemail_greetings['label-nameinfo']."\n"; echo "
\n"; - echo " Description:\n"; + echo " ".$contentvoicemail_greetings['label-description'].":\n"; echo "\n"; echo " \n"; echo "
\n"; - echo "You may enter a description here for your reference (not parsed).\n"; + echo "".$contentvoicemail_greetings['label-descriptioninfo']."\n"; echo "
"; diff --git a/app/voicemail_msgs/app_languages.php b/app/voicemail_msgs/app_languages.php new file mode 100644 index 0000000000..edecb60dd2 --- /dev/null +++ b/app/voicemail_msgs/app_languages.php @@ -0,0 +1,119 @@ + diff --git a/app/voicemail_msgs/v_voicemail_msgs.php b/app/voicemail_msgs/v_voicemail_msgs.php index ce6c4be3ee..b232ca6165 100644 --- a/app/voicemail_msgs/v_voicemail_msgs.php +++ b/app/voicemail_msgs/v_voicemail_msgs.php @@ -26,6 +26,7 @@ include "root.php"; require "includes/require.php"; require_once "includes/checkauth.php"; +require_once "app_languages.php"; if (permission_exists('voicemail_view')) { //access granted } @@ -34,6 +35,9 @@ else { exit; } + foreach($contentvoicemail_msgs as $key => $value) { + $contentvoicemail_msgs[$key] = $value[$_SESSION['domain']['language']['code']]; + } //download the voicemail if ($_GET['a'] == "download") { @@ -126,15 +130,15 @@ else { echo "\n"; echo "\n"; - echo "\n"; + echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; - $tmp_msg_header .= th_order_by('created_epoch', 'Created', $order_by, $order); + $tmp_msg_header .= th_order_by('created_epoch', $contentvoicemail_msgs['label-created'], $order_by, $order); //$tmp_msg_header .= th_order_by('read_epoch', 'Read', $order_by, $order); //$tmp_msg_header .= th_order_by('username', 'Ext', $order_by, $order); //$tmp_msg_header .= th_order_by('domain', 'Domain', $order_by, $order); //$tmp_msg_header .= th_order_by('uuid', 'UUID', $order_by, $order); - $tmp_msg_header .= th_order_by('cid_name', 'Caller ID Name', $order_by, $order); - $tmp_msg_header .= th_order_by('cid_number', 'Caller ID Number', $order_by, $order); - $tmp_msg_header .= th_order_by('in_folder', 'Folder', $order_by, $order); + $tmp_msg_header .= th_order_by('cid_name', $contentvoicemail_msgs['label-calleridname'], $order_by, $order); + $tmp_msg_header .= th_order_by('cid_number', $contentvoicemail_msgs['label-calleridnumber'], $order_by, $order); + $tmp_msg_header .= th_order_by('in_folder', $contentvoicemail_msgs['label-folder'], $order_by, $order); //$tmp_msg_header .= "\n"; //$tmp_msg_header .= th_order_by('file_path', 'File Path', $order_by, $order); - $tmp_msg_header .= th_order_by('message_len', 'Length (play)', $order_by, $order); - $tmp_msg_header .= "\n"; + $tmp_msg_header .= th_order_by('message_len', $contentvoicemail_msgs['label-length'], $order_by, $order); + $tmp_msg_header .= "\n"; //$tmp_msg_header .= th_order_by('flags', 'Flags', $order_by, $order); //$tmp_msg_header .= th_order_by('read_flags', 'Read Flags', $order_by, $order); $tmp_msg_header .= "\n"; echo "\n"; echo "\n"; @@ -263,7 +267,7 @@ else { echo "\n"; echo " \n"; echo "\n"; diff --git a/app/voicemail_msgs/v_voicemail_msgs_delete.php b/app/voicemail_msgs/v_voicemail_msgs_delete.php index 4882f6859d..7d4c12a992 100644 --- a/app/voicemail_msgs/v_voicemail_msgs_delete.php +++ b/app/voicemail_msgs/v_voicemail_msgs_delete.php @@ -26,6 +26,7 @@ include "root.php"; require "includes/require.php"; require_once "includes/checkauth.php"; +require_once "app_languages.php"; if (permission_exists('voicemail_delete')) { //access granted } @@ -34,6 +35,10 @@ else { exit; } + foreach($contentvoicemail_msgs as $key => $value) { + $contentvoicemail_msgs[$key] = $value[$_SESSION['domain']['language']['code']]; + } + //get the http get values if (count($_GET)>0) { $uuid = $_GET["uuid"]; @@ -46,7 +51,7 @@ else { //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 = "
".$contentvoicemail_msgs['confirm-socket']."
"; } //show the error message or show the content @@ -55,7 +60,7 @@ else { echo "
\n"; echo "
Voicemail Messages".$contentvoicemail_msgs['title']." 
\n"; - echo "Voicemails are listed, played, downloaded and deleted from this page. \n"; + echo "".$contentvoicemail_msgs['description']." \n"; if (if_group("admin") || if_group("superadmin")) { - echo "Voicemails for an extension are shown to the user(s) that have been assigned to an extension.\n"; - echo "User accounts are created in the 'User Manager' and then are assigned on the 'Extensions' page. \n"; + echo "".$contentvoicemail_msgs['description2']." \n"; + echo "".$contentvoicemail_msgs['description3']." \n"; echo "
\n"; echo "
\n"; } @@ -144,18 +148,18 @@ else { $tmp_msg_header = ''; $tmp_msg_header .= "
OptionsSize (download)".$contentvoicemail_msgs['label-size']."\n"; @@ -173,12 +177,12 @@ else { if (strlen($value['user']) > 0) { echo "
\n"; echo "
\n"; - echo " Mailbox: ".$value['user']." \n"; + echo " ".$contentvoicemail_msgs['table-mailbox'].": ".$value['user']." \n"; echo " \n"; echo "
\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo "
\n"; //echo " $v_link_label_edit\n"; - echo "   $v_link_label_delete\n"; + echo "   $v_link_label_delete\n"; echo "
\n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; @@ -71,17 +76,17 @@ else { $response = trim(event_socket_request($fp, $cmd)); echo $xml_response; if (strcmp($response,"+OK")==0) { - $msg = "Complete"; + $msg = "".$contentvoicemail_msgs['confirm-complete'].""; } else { - $msg = "Failed"; + $msg = "".$contentvoicemail_msgs['confirm-failed'].""; } //redirect the user require_once "includes/header.php"; echo "\n"; echo "
\n"; - echo "Delete $msg\n"; + echo "".$contentvoicemail_msgs['confirm-delete2']." $msg\n"; echo "
\n"; require_once "includes/footer.php"; return; diff --git a/app/voicemail_msgs/v_voicemail_msgs_password.php b/app/voicemail_msgs/v_voicemail_msgs_password.php index f631a414fb..a3366750bb 100644 --- a/app/voicemail_msgs/v_voicemail_msgs_password.php +++ b/app/voicemail_msgs/v_voicemail_msgs_password.php @@ -26,6 +26,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +require_once "app_languages.php"; if (permission_exists('voicemail_edit')) { //access granted } @@ -34,6 +35,10 @@ else { exit; } + foreach($contentvoicemail_msgs as $key => $value) { + $contentvoicemail_msgs[$key] = $value[$_SESSION['domain']['language']['code']]; + } + //set the action as an add or update if (isset($_REQUEST["id"])) { $action = "update"; @@ -114,7 +119,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { //if (strlen($extension) == 0) { $msg .= "Please provide: Extension
\n"; } //if (strlen($password) == 0) { $msg .= "Please provide: Password
\n"; } //if (strlen($mailbox) == 0) { $msg .= "Please provide: Mailbox
\n"; } - if (strlen($vm_password) == 0) { $msg .= "Please provide: Voicemail Password
\n"; } + if (strlen($vm_password) == 0) { $msg .= "".$contentvoicemail_msgs['confirm-password']."
\n"; } //if (strlen($accountcode) == 0) { $msg .= "Please provide: Account Code
\n"; } //if (strlen($effective_caller_id_name) == 0) { $msg .= "Please provide: Effective Caller ID Name
\n"; } //if (strlen($effective_caller_id_number) == 0) { $msg .= "Please provide: Effective Caller ID Number
\n"; } @@ -184,7 +189,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { require_once "includes/header.php"; echo "\n"; echo "
\n"; - echo "Update Complete\n"; + echo "".$contentvoicemail_msgs['confirm-update']."\n"; echo "
\n"; require_once "includes/footer.php"; return; @@ -266,18 +271,18 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; echo "
Message".$contentvoicemail_msgs['label-message']."
$msg
\n"; echo "\n"; - echo " \n"; - echo " \n"; + echo " \n"; + echo " \n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; @@ -305,7 +310,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { 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"; @@ -405,7 +410,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update") { echo " \n"; } - echo " \n"; + echo " \n"; echo " \n"; echo " "; echo "
Voicemail Settings for $extension

".$contentvoicemail_msgs['label-voicemail']." $extension

\n"; - echo " Voicemail Password:\n"; + echo " ".$contentvoicemail_msgs['label-password'].":\n"; echo "\n"; echo " \n"; echo "
\n"; - echo "Enter the password here. \n"; + echo "".$contentvoicemail_msgs['label-passwordinfo']." \n"; echo "
\n"; - echo " Voicemail Enabled:\n"; + echo " ".$contentvoicemail_msgs['label-enabled'].":\n"; echo "\n"; echo " \n"; echo "
\n"; - echo "Enable/disable voicemail for this extension.\n"; + echo " ".$contentvoicemail_msgs['label-enabledinfo']."\n"; echo "
\n"; - echo " Voicemail Mail To:\n"; + echo " ".$contentvoicemail_msgs['label-mail'].":\n"; echo "\n"; echo " \n"; echo "
\n"; - echo "Optional: Enter the email address to send voicemail to.\n"; + echo "".$contentvoicemail_msgs['label-mailinfo']."\n"; echo "
\n"; - echo " Voicemail Attach File:\n"; + echo " ".$contentvoicemail_msgs['label-attach'].":\n"; echo "\n"; echo " \n"; echo "
\n"; - echo "Choose whether to attach the file to the email.\n"; + echo "".$contentvoicemail_msgs['label-attachinfo']."\n"; echo "
\n"; - echo " VM Keep Local After Email:\n"; + echo " ".$contentvoicemail_msgs['label-vm'].":\n"; echo "\n"; echo " \n"; echo "
\n"; - echo "Keep local file after sending the email. \n"; + echo "".$contentvoicemail_msgs['label-vminfo']." \n"; echo "
"; diff --git a/app/voicemail_msgs/v_voicemail_msgs_play.php b/app/voicemail_msgs/v_voicemail_msgs_play.php index 7370713f3a..77a212c845 100644 --- a/app/voicemail_msgs/v_voicemail_msgs_play.php +++ b/app/voicemail_msgs/v_voicemail_msgs_play.php @@ -27,6 +27,7 @@ include "root.php"; require_once "includes/require.php"; require_once "includes/checkauth.php"; +require_once "app_languages.php"; if (permission_exists('voicemail_view')) { //access granted } @@ -35,6 +36,10 @@ else { exit; } + foreach($contentvoicemail_msgs as $key => $value) { + $contentvoicemail_msgs[$key] = $value[$_SESSION['domain']['language']['code']]; + } + //get the http get values $uuid = $_GET['uuid']; $file_ext = $_GET['ext']; @@ -48,7 +53,7 @@ else { //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 = "
".$contentvoicemail_msgs['confirm-socket']."
"; } //show the error message or show the content @@ -57,7 +62,7 @@ else { echo "
\n"; echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; echo " \n"; echo " \n"; diff --git a/app_languages.php b/app_languages.php new file mode 100644 index 0000000000..24acbee9d4 --- /dev/null +++ b/app_languages.php @@ -0,0 +1,33 @@ + diff --git a/index2.php b/index2.php index 0b4f07123b..6b8c037595 100644 --- a/index2.php +++ b/index2.php @@ -31,10 +31,15 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'].PROJECT_PATH."/includes/config.php")) require_once "includes/require.php"; require_once "includes/checkauth.php"; require_once "includes/header.php"; +require_once "app_languages.php"; echo "
"; echo "
"; + foreach($content as $key => $value) { + $content[$key] = $value[$_SESSION['domain']['language']['code']]; + } + //information //echo "
Message".$contentvoicemail_msgs['label-message']."
$msg
\n"; //echo " \n"; @@ -47,24 +52,22 @@ echo "
"; 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 "
User Information ".$content['title-table']." 
\n"; - echo " UserName: \n"; + echo " ".$content['label-name'].": \n"; echo " \n"; echo " ".$_SESSION["username"]." \n"; echo "
\n"; - echo " Voicemail: \n"; + echo " ".$content['label-voicemail'].": \n"; echo " \n"; - echo " View Messages \n"; + echo " ".$content['label-view-messages']." \n"; echo "
\n"; @@ -90,4 +93,4 @@ echo "
"; //show the footer require_once "includes/footer.php"; -?> \ No newline at end of file +?> diff --git a/install.php b/install.php index 265bdf4698..f33c1c894e 100644 --- a/install.php +++ b/install.php @@ -1755,4 +1755,4 @@ if ($_POST["install_step"] == "3" && count($_POST)>0 && strlen($_POST["persistfo echo $output; unset($output); -?> \ No newline at end of file +?>