diff options
author | raul | 2014-06-13 21:36:02 +0200 |
---|---|---|
committer | Michael Pereira Neves | 2014-07-11 15:01:59 +0200 |
commit | 4af90a9a1c8c8007cea547383c0de28c62c4e34e (patch) | |
tree | 6ce7103175fc383ec14c3094de6a0118f4c508cc /dictionary.php | |
parent | Update .gitignore to exclude netbeans project file (diff) | |
download | slx-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.php | 14 |
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]; + } +} |