Config :: getAvailableDefaultLanguages: Bitrix method

      
<?php 
//  Bitrix\Translate\Config :: getAvailableDefaultLanguages()
//  /dist/bitrix/modules/translate/lib/config.php:291

    
public static function getAvailableDefaultLanguages()
    {
        static 
$langs = [];
        if (empty(
$langs))
        {
            
$langDirList = new Main\IO\Directory(Main\Application::getDocumentRoot(). '/bitrix/modules/main/lang/');
            foreach (
$langDirList->getChildren() as $langDir)
            {
                
$langId $langDir->getName();
                if (
in_array($langIdTranslate\IGNORE_FS_NAMES) || !$langDir->isDirectory())
                {
                    continue;
                }
                
$langs[] = $langId;
            }
        }

        return 
$langs;
    }