summaryrefslogtreecommitdiffstats
path: root/dictionary.php
diff options
context:
space:
mode:
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];
+ }
+}