• Модуль: translate
  • Путь к файлу: ~/bitrix/modules/translate/lib/file.php
  • Класс: BitrixTranslateFile
  • Вызов: File::instantiateByPath
static function instantiateByPath(string $path): self
{
	if (empty($path) || !TranslateIOPath::isPhpFile($path) || !preg_match("#.+/lang/[a-z]{2}/.+.php$#", $path))
	{
		throw new MainArgumentException("Parameter 'path' has a wrong value");
	}

	$file = (new static($path))
		->setLangId(TranslateIOPath::extractLangId($path));

	return $file;
}