• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/settings.php
  • Класс: BitrixTranslateSettings
  • Вызов: Settings::instantiateByPath
static function instantiateByPath(string $fullPath): ?self
{
	if (empty($fullPath))
	{
		throw new MainArgumentException();
	}

	$file = null;
	if (mb_substr($fullPath, -5) === '/lang' || mb_substr($fullPath, -6) === '/lang/')
	{
		$file = new static($fullPath. '/'. self::FILE_NAME);
	}
	elseif (preg_match("#^(.*?/lang/)([^/]+)/*(.+)#".(TranslateConfig::isUtfMode() ? 'u' : ''), $fullPath, $parts))
	{
		$file = new static($parts[1]. '/'. self::FILE_NAME);
	}

	return $file;
}