code: public function getName($locale = null)
      {
          if ($locale) {
            if (isset($this->name[$locale])) {
               return $this->name[$locale];
            } else {
               foreach ($this->name as $name) {
                  if (!empty($name)) {
                     return $name;
                  }
               }
            }
            
            return '';
            
         } else {
            return $this->name;
         };
      }
docs: Get name
  
  @return array