Vinoteca: модуль, шаблон и компоненты интернет-магазина вина на 1С-Битрикс

This commit is contained in:
jimagie committed 2026-10-22 03:32:28 +05:00
commit f6ba0d2174
470 files changed
+26454

No files matched your search

@@ -0,0 +1,21 @@
<?php
declare(strict_types=1);
namespace Jinove\Vinoteca;
class Language
{
public static function url(string $language): string
{
global $APPLICATION;
$languages = Config::languages();
$path = (string)$APPLICATION->GetCurPage(false);
if (SITE_DIR !== "/" && str_starts_with($path, SITE_DIR)) {
$path = "/" . substr($path, strlen(SITE_DIR));
}
return Config::host() . rtrim((string)($languages[$language]["dir"] ?? "/"), "/") . $path;
}
}