function __construct($version, $app_id = false)
 {
     $Settings = PerchSettings::fetch();
     if (defined('PERCH_DB_DATABASE')) {
         $this->lang = $Settings->get('lang')->settingValue();
     }
     if (!$this->lang) {
         $this->lang = 'en-gb';
     }
     $ds = DIRECTORY_SEPARATOR;
     if (!$app_id) {
         $current_app = PerchUtil::get_current_app();
         $path = $current_app['section'];
     } else {
         $path = 'addons' . $ds . 'apps' . $ds . $app_id;
     }
     $this->lang_dir = PERCH_PATH . $ds . $path . $ds . 'lang';
     $this->lang_file = $this->lang_dir . $ds . $this->lang . '.txt';
 }