4af90a9a ^
1 2 3 4 5 6 7 8 9 10 11 12 13 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]; } }