summaryrefslogtreecommitdiffstats
path: root/lang/dictionary.php
diff options
context:
space:
mode:
authorraul2014-07-10 15:29:50 +0200
committerraul2014-07-10 15:29:50 +0200
commite2810bc15b98ea9744d0aab6c1f13c7385adbb2b (patch)
tree9ce684694292a17011d6f0fc0752d1fad248d001 /lang/dictionary.php
parent[i18n] changed DB script to the new language notation (diff)
downloadslx-admin-e2810bc15b98ea9744d0aab6c1f13c7385adbb2b.tar.gz
slx-admin-e2810bc15b98ea9744d0aab6c1f13c7385adbb2b.tar.xz
slx-admin-e2810bc15b98ea9744d0aab6c1f13c7385adbb2b.zip
[i18n] reorganized the internationalization system
Diffstat (limited to 'lang/dictionary.php')
-rw-r--r--lang/dictionary.php35
1 files changed, 0 insertions, 35 deletions
diff --git a/lang/dictionary.php b/lang/dictionary.php
deleted file mode 100644
index e1281dd1..00000000
--- a/lang/dictionary.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-class Dictionary{
- private static $dictionary;
- private static $messageArray;
-
- function build(){
- self::$dictionary = self::sliceArray(json_decode(file_get_contents("lang/dictionary.json"),true));
- self::$messageArray = self::sliceArray(json_decode(file_get_contents("lang/translations/messages.json"),true));
- }
-
- public static function getArray(){
- return self::$dictionary;
- }
-
- public static function getArrayTemplate($template){
- return self::sliceArray(json_decode(file_get_contents("lang/translations/" . $template . ".json"),true));
- }
-
- public static function translate($string){
- return self::$dictionary[$string];
- }
-
- public static function getMessages(){
- return self::$messageArray;
- }
-
- private static function sliceArray($array){
- foreach($array as $key => $text){
- $array[$key] = $text[LANG];
- }
- return $array;
- }
-
-}