• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/localization/loc.php
  • Класс: BitrixMainLocalizationLoc
  • Вызов: Loc::getCurrentLang
static function getCurrentLang()
{
	if(self::$currentLang === null)
	{
		$context = Context::getCurrent();
		if($context !== null)
		{
			$language = $context->getLanguage();
			if($language !== null)
			{
				self::$currentLang = $language;
			}
		}
	}
	return (self::$currentLang !== null? self::$currentLang : 'en');
}