code: public function getLanguages()
      {
          $languages = array();
  
          /** @var SiteAliasInterface $siteAlias */
          foreach ($this->getAliases() as $siteAlias) {
              $language = $siteAlias->getLanguage();
              if (!in_array($language, $languages)) {
                  $languages[] = $language;
              }
          }
  
          return $languages;
      }
docs: Get all languages of the site
  
  @return array