diff --git a/app/vars/app_languages.php b/app/vars/app_languages.php
new file mode 100644
index 0000000000..c5f7b4f5e3
--- /dev/null
+++ b/app/vars/app_languages.php
@@ -0,0 +1,48 @@
+
\ No newline at end of file
diff --git a/app/vars/var_delete.php b/app/vars/var_delete.php
index 377032fc77..1ffc255849 100644
--- a/app/vars/var_delete.php
+++ b/app/vars/var_delete.php
@@ -34,6 +34,12 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
if (count($_GET)>0) {
$id = $_GET["id"];
}
@@ -53,7 +59,7 @@ if (count($_GET)>0) {
require_once "includes/header.php";
echo "\n";
echo "
\n";
- echo "Add Complete\n";
+ echo $text['message-add']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -149,7 +154,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
require_once "includes/header.php";
echo "\n";
- echo "Update Complete\n";
+ echo $text['message-update']."\n";
echo "
\n";
require_once "includes/footer.php";
return;
@@ -179,6 +184,12 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
//include header
require_once "includes/header.php";
+ if ($action == "add") {
+ $page["title"] = $text['title-variable_add'];
+ }
+ if ($action == "update") {
+ $page["title"] = $text['title-variable_edit'];
+ }
//show contents
echo "";
@@ -193,67 +204,66 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo "
\n";
if ($action == "add") {
- echo "| Variable Add | \n";
+ echo "".$text['header-variable_add']." | \n";
}
if ($action == "update") {
- echo "Variable Edit | \n";
+ echo "".$text['header-variable_edit']." | \n";
}
- echo " | \n";
+ echo " | \n";
echo "
\n";
echo "
\n";
echo "| \n";
- echo " Name:\n";
+ echo " ".$text['label-name'].":\n";
echo " | \n";
echo "\n";
echo " \n";
echo " \n";
- echo "Enter the variable name here. \n";
+ echo $text['description-name']."\n";
echo " | \n";
echo "
\n";
echo "
\n";
echo "| \n";
- echo " Value:\n";
+ echo " ".$text['label-value'].":\n";
echo " | \n";
echo "\n";
echo " \n";
echo " \n";
- echo "Enter the variable value here. \n";
+ echo $text['description-value']."\n";
echo " | \n";
echo "
\n";
echo "
\n";
echo "| \n";
- echo " Category:\n";
+ echo " ".$text['label-category'].":\n";
echo " | \n";
echo "\n";
$table_name = 'v_vars';$field_name = 'var_cat';$sql_where_optional = "";$field_current_value = $var_cat;
echo html_select_other($db, $table_name, $field_name, $sql_where_optional, $field_current_value);
- //echo " \n";
echo " \n";
- echo "Enter the category here.\n";
+ echo $text['description-category']."\n";
echo " | \n";
echo "
\n";
echo "
\n";
echo "| \n";
- echo " Enabled:\n";
+ echo " ".$text['label-enabled'].":\n";
echo " | \n";
echo "\n";
echo " \n";
echo " \n";
@@ -263,11 +273,10 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
echo " |
\n";
echo "| \n";
- echo " Order:\n";
+ echo " ".$text['label-order'].":\n";
echo " | \n";
echo "\n";
echo " |
\n";
diff --git a/app/vars/vars_textarea.php b/app/vars/vars_textarea.php
index a90c485a9b..a6db42d7b0 100644
--- a/app/vars/vars_textarea.php
+++ b/app/vars/vars_textarea.php
@@ -34,8 +34,15 @@ else {
exit;
}
+//add multi-lingual support
+ require_once "app_languages.php";
+ foreach($text as $key => $value) {
+ $text[$key] = $value[$_SESSION['domain']['language']['code']];
+ }
+
//include the header
require_once "includes/header.php";
+ $page["title"] = $text['title-variables_advanced'];
//restore the default vars.xml
if ($_GET['a'] == "default" && permission_exists('variables_edit')) {
@@ -43,7 +50,7 @@ if ($_GET['a'] == "default" && permission_exists('variables_edit')) {
$fd = fopen($_SESSION['switch']['conf']['dir'].".orig/vars.xml", "r");
$v_content = fread($fd, filesize($_SESSION['switch']['conf']['dir'].".orig/vars.xml"));
fclose($fd);
-
+
//write the default config fget
$fd = fopen($_SESSION['switch']['conf']['dir']."/vars.xml", "w");
fwrite($fd, $v_content);
@@ -66,16 +73,16 @@ if ($_GET['a'] == "default" && permission_exists('variables_edit')) {
fclose($fd);
//edit area
- echo " \n";
+ echo " \n";
echo "