• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/localization/loc.php
  • Класс: BitrixMainLocalizationLoc
  • Вызов: Loc::includeFile
static function includeFile($path)
{
	self::$includedFiles[$path] = $path;

	//the name $MESS is predefined in language files
	$MESS = array();
	include($path);

	//redefine messages from user lang file
	if(!empty(self::$userMessages))
	{
		$path = str_replace("\", "/", realpath($path));

		//cycle through languages
		foreach(self::$userMessages as $messages)
		{
			if(isset($messages[$path]) && is_array($messages[$path]))
			{
				foreach($messages[$path] as $key => $val)
				{
					$MESS[$key] = $val;
				}
			}
		}
	}

	return $MESS;
}