summaryrefslogtreecommitdiffstats
path: root/dictionary.php
diff options
context:
space:
mode:
authorraul2014-06-13 21:36:02 +0200
committerMichael Pereira Neves2014-07-11 15:01:59 +0200
commit4af90a9a1c8c8007cea547383c0de28c62c4e34e (patch)
tree6ce7103175fc383ec14c3094de6a0118f4c508cc /dictionary.php
parentUpdate .gitignore to exclude netbeans project file (diff)
downloadslx-admin-4af90a9a1c8c8007cea547383c0de28c62c4e34e.tar.gz
slx-admin-4af90a9a1c8c8007cea547383c0de28c62c4e34e.tar.xz
slx-admin-4af90a9a1c8c8007cea547383c0de28c62c4e34e.zip
[i18n] add i18n support, WIP
Diffstat (limited to 'dictionary.php')
-rw-r--r--dictionary.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/dictionary.php b/dictionary.php
new file mode 100644
index 00000000..9563f7c3
--- /dev/null
+++ b/dictionary.php
@@ -0,0 +1,14 @@
+<?php
+
+class Dictionary{
+ private $dictionary;
+
+ function __construct(){
+ $this->dictionary = json_decode(file_get_contents("dictionary.json"),true);
+ }
+
+
+ public function translate($text){
+ return $this->dictionary[$text][LANG];
+ }
+}