private function getTranslations($lang) {
    if (!isset($this->translations[$lang])) {
      $messageFile = $this->localeDir."/messages_".$lang.".php";
      if (file_exists($messageFile)) {
        require_once($messageFile);
        // store for later reference
        $this->translations[$lang] = ${"messages_$lang"};
      }
      else {
        $this->translations[$lang] = [];
      }
    }
    return $this->translations[$lang];
  }