• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/lib/localization/loc.php
  • Класс: BitrixMainLocalizationLoc
  • Вызов: Loc::loadUserMessages
static function loadUserMessages($lang)
{
	$userMess = array();
	$documentRoot = MainApplication::getDocumentRoot();
	if(($fname = MainLoader::getLocal("php_interface/user_lang/".$lang."/lang.php", $documentRoot)) !== false)
	{
		$mess = self::includeFile($fname);

		// typical call is Loc::loadMessages(__FILE__)
		// __FILE__ can differ from path used in the user file
		foreach($mess as $key => $val)
			$userMess[str_replace("\", "/", realpath($documentRoot.$key))] = $val;
	}
	return $userMess;
}