summaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorraul2014-07-15 21:06:07 +0200
committerraul2014-07-15 21:06:07 +0200
commitbd9cdadb71b9cb46e7c8c629739997d2a0c1388e (patch)
tree2c8084c0132b581f6e2eb850248eddee69a77b7a /lang
parent[i18n] Updated the translations (diff)
downloadslx-admin-bd9cdadb71b9cb46e7c8c629739997d2a0c1388e.tar.gz
slx-admin-bd9cdadb71b9cb46e7c8c629739997d2a0c1388e.tar.xz
slx-admin-bd9cdadb71b9cb46e7c8c629739997d2a0c1388e.zip
[i18n] Added administration interface for the i18n system
Diffstat (limited to 'lang')
-rw-r--r--lang/de/administration/_page.json1
-rw-r--r--lang/de/administration/template.json1
-rw-r--r--lang/de/messages.json3
-rw-r--r--lang/en/administration/_page.json1
-rw-r--r--lang/en/administration/template.json1
-rw-r--r--lang/en/messages.json3
-rw-r--r--lang/i18n.php11
-rw-r--r--lang/pt/administration/_page.json1
-rw-r--r--lang/pt/administration/template.json1
-rw-r--r--lang/pt/messages.json3
-rw-r--r--lang/pt/sysconfig/_page.json1
11 files changed, 21 insertions, 6 deletions
diff --git a/lang/de/administration/_page.json b/lang/de/administration/_page.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/lang/de/administration/_page.json
@@ -0,0 +1 @@
+{}
diff --git a/lang/de/administration/template.json b/lang/de/administration/template.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/lang/de/administration/template.json
@@ -0,0 +1 @@
+{}
diff --git a/lang/de/messages.json b/lang/de/messages.json
index 2947db55..64ffcb58 100644
--- a/lang/de/messages.json
+++ b/lang/de/messages.json
@@ -35,5 +35,6 @@
"news-save-success": "News erfolgreich aktualisiert",
"news-empty": "Es wurde keine News in der Datenbank gefunden",
"news-del-success": "News gelöscht",
- "reboot-unconfirmed": "Sicherheitsabfrage zum Reboot nicht bestätigt"
+ "reboot-unconfirmed": "Sicherheitsabfrage zum Reboot nicht bestätigt",
+ "invalid-template":"Ausgewählte Template ist nicht gültig"
}
diff --git a/lang/en/administration/_page.json b/lang/en/administration/_page.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/lang/en/administration/_page.json
@@ -0,0 +1 @@
+{}
diff --git a/lang/en/administration/template.json b/lang/en/administration/template.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/lang/en/administration/template.json
@@ -0,0 +1 @@
+{}
diff --git a/lang/en/messages.json b/lang/en/messages.json
index 4e70c3a2..60e6baba 100644
--- a/lang/en/messages.json
+++ b/lang/en/messages.json
@@ -35,5 +35,6 @@
"news-save-success": "News updated successfully",
"news-empty": "There was no news found in the database",
"news-del-success": "News deleted",
- "reboot-unconfirmed": "Confirmation prompt to reboot not confirmed"
+ "reboot-unconfirmed": "Confirmation prompt to reboot not confirmed",
+ "invalid-template":"Selected template is not valid"
}
diff --git a/lang/i18n.php b/lang/i18n.php
index 82da12a1..1f7731f2 100644
--- a/lang/i18n.php
+++ b/lang/i18n.php
@@ -7,9 +7,11 @@ class Dictionary{
self::$messageArray = json_decode(file_get_contents("lang/" . LANG . "/messages.json"),true);
}
- public static function getArrayTemplate($template){
+ public static function getArrayTemplate($template,$lang = false){
$language = array('lang'=>LANG);
- return array_merge($language,json_decode(file_get_contents("lang/" . LANG . "/" . $template . ".json"),true));
+ if(!$lang)
+ return array_merge($language,json_decode(file_get_contents("lang/" . LANG . "/" . $template . ".json"),true));
+ return array_merge($language,json_decode(file_get_contents("lang/" . $lang . "/" . $template . ".json"),true));
}
public static function translate($string){
@@ -23,7 +25,8 @@ class Dictionary{
}
//Array containing the allowed languages for the website
- $langArray = array("de","en","pt");
+ $langArray = unserialize(SITE_LANGUAGES);
+
//Changes the language in case there is a request to
if(isset($_GET['lang']))
@@ -44,4 +47,6 @@ class Dictionary{
}else if(in_array($langBrowser,$langArray)){
$language = $langBrowser;
}
+
+ define('LANG', $language);
?>
diff --git a/lang/pt/administration/_page.json b/lang/pt/administration/_page.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/lang/pt/administration/_page.json
@@ -0,0 +1 @@
+{}
diff --git a/lang/pt/administration/template.json b/lang/pt/administration/template.json
new file mode 100644
index 00000000..0967ef42
--- /dev/null
+++ b/lang/pt/administration/template.json
@@ -0,0 +1 @@
+{}
diff --git a/lang/pt/messages.json b/lang/pt/messages.json
index 345a5398..3eee3f9c 100644
--- a/lang/pt/messages.json
+++ b/lang/pt/messages.json
@@ -35,5 +35,6 @@
"news-save-success": "Notícia atualizada com sucesso",
"news-empty": "Não havia notícias no banco de dados",
"news-del-success": "Notícia excluída",
- "reboot-unconfirmed": "Confirmação para reinicializar não foi confirmada"
+ "reboot-unconfirmed": "Confirmação para reinicializar não foi confirmada",
+ "invalid-template":"Template selecionado não é válido"
}
diff --git a/lang/pt/sysconfig/_page.json b/lang/pt/sysconfig/_page.json
index e40a277d..f1e862bc 100644
--- a/lang/pt/sysconfig/_page.json
+++ b/lang/pt/sysconfig/_page.json
@@ -12,5 +12,6 @@
"lang_newModule":"Novo Módulo",
"lang_systemConfiguration":"Confguração do Sistema",
"lang_helpSystemConfiguration":"A localização fundamental do sistema bwLehrpool é feita através de uma configuração de sistema. Isso inclui aspectos como o método de autenticação de usuários (por exemplo, Diretório Ativo, LDAP), configuração de impressora, diretórios home, etc. Uma configuração de sistema é composta por um ou mais módulo de configuração, que podem ser gerenciados na parte inferior da página.",
+ "lang_moduleConfiguration":"Configuração do Módulo",
"lang_helpModuleConfiguration":"Módulos de configuração são as peças fundamentais para a criação de uma configuração de sistema. Aqui você pode criar tanto módulos genéricos através de nossa interface, tanto quanto criar módulos completamente customizados (é necessário conhecimento de Linux avançado)."
}