protected function getLocalizedFileReference(string $table, string $field) {
    if ($this->getSysLanguageUid() > 0) {
      $localizedFileReferences = $this->getLocalizedFileReferences($table, $field);

      if (!empty($localizedFileReferences)) {
        $localizedFileObject = $localizedFileReferences[0]->toArray();

        if ($localizedFileObject) {
          $pid = intval($localizedFileObject['pid']);
          $uid = intval($localizedFileObject['uid']);

          $fileReference                = new FileReference();
          $fileReference->pid           = $pid;
          $fileReference->uid           = $uid;
          $fileReference->_languageUid  = 0;
          $fileReference->_localizedUid = $uid;
          $fileReference->_versionedUid = $uid;

          return $fileReference;
        }
      }
    }

    return null;
  }