• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/componentbase.php
  • Класс: BitrixTranslateComponentBase
  • Вызов: ComponentBase::detectStartingPath
protected function detectStartingPath(?string $path = ''): string
{
	$home = TranslateConfig::getDefaultPath();

	$initPaths = TranslateConfig::getInitPath();
	if (count($initPaths) > 0)
	{
		$home = $initPaths[0];
		if (!empty($path))
		{
			foreach ($initPaths as $initPath)
			{
				if (mb_strpos($path, $initPath) === 0)
				{
					$home = $initPath;
					break;
				}
			}
		}
	}

	return $home;
}