src/wcmf/lib/i18n/impl/FileMessage.php
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];
  }
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];
  }
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 ] ; }
Get all translations for a language.
@param $lang The language (optional, default: '')
@return The translations as associative array
Get all translations for a language .