• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/app.php
  • Класс: BitrixRestAppTable
  • Вызов: AppTable::getLicenseLanguage
static function getLicenseLanguage()
{
	if(static::$licenseLang === null)
	{
		if(MainLoader::includeModule('bitrix24'))
		{
			static::$licenseLang = CBitrix24::getLicensePrefix();
		}
		else
		{
			$dbSites = CSite::getList('sort', 'asc', array('DEFAULT' => 'Y', 'ACTIVE' => 'Y'));
			$site = $dbSites->fetch();

			static::$licenseLang = is_array($site) && isset($site['LANGUAGE_ID']) ? $site['LANGUAGE_ID'] : LANGUAGE_ID;
		}

		if(static::$licenseLang === null)
		{
			static::$licenseLang = 'en';
		}
	}

	return static::$licenseLang;
}