From 698afef05d55a955cbd74ea4b4bb4c9d1b28f9ea Mon Sep 17 00:00:00 2001 From: Rinor Hoxha Date: Sat, 24 Nov 2012 22:59:08 +0000 Subject: [PATCH] Dialplan Inbound Multi lang rev.01 --- app/dialplan_inbound/app_languages.php | 62 ++++++++++++++++ app/dialplan_inbound/dialplan_inbound_add.php | 70 ++++++++++--------- 2 files changed, 100 insertions(+), 32 deletions(-) create mode 100644 app/dialplan_inbound/app_languages.php diff --git a/app/dialplan_inbound/app_languages.php b/app/dialplan_inbound/app_languages.php new file mode 100644 index 0000000000..6d41954860 --- /dev/null +++ b/app/dialplan_inbound/app_languages.php @@ -0,0 +1,62 @@ + \ No newline at end of file diff --git a/app/dialplan_inbound/dialplan_inbound_add.php b/app/dialplan_inbound/dialplan_inbound_add.php index 155ad403a3..46cefcdacd 100644 --- a/app/dialplan_inbound/dialplan_inbound_add.php +++ b/app/dialplan_inbound/dialplan_inbound_add.php @@ -1,4 +1,4 @@ - $value) { + $text[$key] = $value[$_SESSION['domain']['language']['code']]; +} + //get the http get values and set them as php variables $order_by = $_GET["order_by"]; $order = $_GET["order"]; @@ -78,7 +84,7 @@ require_once "includes/paging.php"; $condition_expression_1 = '^'.$condition_expression_1.'$'; } else { - $msg .= "The destination number must be numeric.
\n"; + $msg .= "".$text['label-destination-must-be-num']."
\n"; } } $dialplan_enabled = check_str($_POST["dialplan_enabled"]); @@ -88,11 +94,11 @@ require_once "includes/paging.php"; 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($dialplan_name) == 0) { $msg .= "Please provide: Extension Name
\n"; } - if (strlen($condition_field_1) == 0) { $msg .= "Please provide: Condition Field
\n"; } - if (strlen($condition_expression_1) == 0) { $msg .= "Please provide: Condition Expression
\n"; } - if (strlen($action_application_1) == 0) { $msg .= "Please provide: Action Application
\n"; } + if (strlen($domain_uuid) == 0) { $msg .= "".$text['label-required-domain_uuid']."
\n"; } + if (strlen($dialplan_name) == 0) { $msg .= "".$text['label-required-dialplan_name']."
\n"; } + if (strlen($condition_field_1) == 0) { $msg .= "".$text['label-required-condition_field_1']."
\n"; } + if (strlen($condition_expression_1) == 0) { $msg .= "".$text['label-required-condition_expression_1']."
\n"; } + if (strlen($action_application_1) == 0) { $msg .= "".$text['label-required-action_application_1']."
\n"; } //if (strlen($limit) == 0) { $msg .= "Please provide: Limit
\n"; } //if (strlen($dialplan_enabled) == 0) { $msg .= "Please provide: Enabled True or False
\n"; } //if (strlen($dialplan_description) == 0) { $msg .= "Please provide: Description
\n"; } @@ -423,7 +429,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { require_once "includes/header.php"; echo "\n"; echo "
\n"; - echo "Update Complete\n"; + echo "".$text['confirm-update-complete']."\n"; echo "
\n"; require_once "includes/footer.php"; return; @@ -474,23 +480,23 @@ 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"; if (permission_exists("inbound_route_edit") && $action == "advanced") { echo "\n"; echo "\n"; echo "\n"; - echo " \n"; + echo " \n"; echo " \n"; - echo " \n"; + echo " \n"; echo " \n"; @@ -591,14 +597,14 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; echo "
Inbound Call Routing\n"; + echo " ".$text['title-dialplan-inbound-add']."\n"; echo " \n"; echo " \n"; if (permission_exists("inbound_route_edit") && $action == "advanced") { - echo " \n"; + echo " \n"; } else { - echo " \n"; + echo " \n"; } - echo " \n"; + echo " \n"; echo "
\n"; echo " \n"; - echo " The public dialplan is used to route incoming calls to destinations based on one or more conditions and context. It can send incoming calls to an auto attendant, huntgroup, extension, external number, or a script.\n"; + echo " ".$text['description-dialplan-inbound-add']."\n"; echo " \n"; echo "
\n"; echo " \n"; @@ -505,19 +511,19 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Name:\n"; + echo " ".$text['label-name'].":\n"; echo "\n"; echo " \n"; echo "
\n"; - echo "Please enter an inbound route name.
\n"; + echo "".$text['description-name']."
\n"; echo "
\n"; - echo " Condition 1:\n"; + echo " ".$text['label-condition_1'].":\n"; echo "\n"; ?> @@ -554,7 +560,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { \n"; echo "
Field:".$text['label-field'].":\n"; echo " \n"; echo "
\n"; echo "
  Expression:  ".$text['label-expression'].":\n"; echo " \n"; echo "
\n"; - echo " Condition 2:\n"; + echo " ".$text['label-condition_2'].":\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 " Field:\n"; + echo " ".$text['label-field'].":\n"; echo " \n"; ?> @@ -656,7 +662,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; echo "
\n"; - echo "   Expression:\n"; + echo "   ".$text['label-expression'].":\n"; echo " \n"; echo " \n"; @@ -670,7 +676,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { else { echo "
\n"; - echo " Destination Number:\n"; + echo " ".$text['label-destination-number'].":\n"; echo "\n"; @@ -689,10 +695,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { } echo " \n"; echo "
\n"; - echo "Select the inbound destination number.\n"; + echo "".$text['label-select-inbound-destination-number']."\n"; } else { - echo " \n"; + echo " \n"; } unset ($prep_statement); @@ -703,10 +709,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; if (permission_exists("inbound_route_edit") && $action=="advanced") { - echo " Action 1:\n"; + echo " ".$text['label-action_1'].":\n"; } else { - echo " Action:\n"; + echo " ".$text['label-action'].":\n"; } echo "\n"; @@ -723,7 +729,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if (permission_exists("inbound_route_edit") && $action=="advanced") { echo "
\n"; - echo " Action 2:\n"; + echo " ".$text['label-action_2'].":\n"; echo "\n"; @@ -736,7 +742,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Limit:\n"; + echo " ".$text['label-limit'].":\n"; echo "\n"; echo " \n"; @@ -747,7 +753,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { echo "
\n"; - echo " Order:\n"; + echo " ".$text['label-order'].":\n"; echo "\n"; echo "
\n"; - echo " Enabled:\n"; + echo " ".$text['label-enabled'].":\n"; echo "\n"; echo "
\n"; - echo " Description:\n"; + echo " ".$text['label-description'].":\n"; echo "\n"; echo " \n"; @@ -807,7 +813,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { if ($action == "update") { echo " \n"; } - echo " \n"; + echo " \n"; echo "