当前位置: 首页>>代码示例>>PHP>>正文


PHP Loc::loadLanguageFile方法代码示例

本文整理汇总了PHP中Bitrix\Main\Localization\Loc::loadLanguageFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Loc::loadLanguageFile方法的具体用法?PHP Loc::loadLanguageFile怎么用?PHP Loc::loadLanguageFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bitrix\Main\Localization\Loc的用法示例。


在下文中一共展示了Loc::loadLanguageFile方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: onBeforeHTMLEditorScriptRuns

 public static function onBeforeHTMLEditorScriptRuns()
 {
     $asset = Asset::getInstance();
     $asset->addJs('/bitrix/js/newkaliningrad.typografru/typograf.js');
     $messages = Loc::loadLanguageFile(Path::normalize(__FILE__));
     $asset->addString(sprintf('<script>BX.message(%s)</script>', Json::encode($messages, JSON_FORCE_OBJECT | JSON_UNESCAPED_UNICODE)));
 }
开发者ID:askew-,项目名称:bitrix-typograf,代码行数:7,代码来源:typograf.php

示例2: print_r

	"ACTIVE_FROM" => "16.03.2011 10:00:00",
	"ACTIVE_TO" => "16.03.2011 10:30:00",
	"PROPERTY_LOCATION" => "ReCoRd 13",
);
$r = $e->Update(
	array("XML_ID" => "AAATAGFudG...", "MODIFICATION_LABEL" => "DwAAABY..."),
	$arFields
);

$r = $e->Delete("AAATAGFud...");

print_r($e->GetErrors());
*/
if (!class_exists("CDavExchangeCalendar")) {
    IncludeModuleLangFile(__FILE__);
    \Bitrix\Main\Localization\Loc::loadLanguageFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/dav/classes/general/exchangecalendar.php");
    class CDavExchangeCalendar extends CDavExchangeClient
    {
        static $arMapItem = array("MimeContent", "ItemId", "ParentFolderId", "ItemClass", "Subject", "Sensitivity", "Body", "Attachments", "DateTimeReceived", "Size", "Categories", "Importance", "InReplyTo", "IsSubmitted", "IsDraft", "IsFromMe", "IsResend", "IsUnmodified", "InternetMessageHeaders", "DateTimeSent", "DateTimeCreated", "ResponseObjects", "ReminderDueBy", "ReminderIsSet", "ReminderMinutesBeforeStart", "DisplayCc", "DisplayTo", "HasAttachments", "ExtendedProperty", "Culture", "EffectiveRights", "LastModifiedName", "LastModifiedTime");
        static $arMapCalendar = array("UID", "RecurrenceId", "DateTimeStamp", "Start", "End", "OriginalStart", "IsAllDayEvent", "LegacyFreeBusyStatus", "Location", "When", "IsMeeting", "IsCancelled", "IsRecurring", "MeetingRequestWasSent", "IsResponseRequested", "CalendarItemType", "MyResponseType", "Organizer", "RequiredAttendees", "OptionalAttendees", "Resources", "ConflictingMeetingCount", "AdjacentMeetingCount", "ConflictingMeetings", "AdjacentMeetings", "Duration", "TimeZone", "AppointmentReplyTime", "AppointmentSequenceNumber", "AppointmentState", "Recurrence", "FirstOccurrence", "LastOccurrence", "ModifiedOccurrences", "DeletedOccurrences", "MeetingTimeZone", "ConferenceType", "AllowNewTimeProposal", "IsOnlineMeeting", "MeetingWorkspaceUrl", "NetShowUrl");
        public function __construct($scheme, $server, $port, $userName, $userPassword, $siteId = null)
        {
            parent::__construct($scheme, $server, $port, $userName, $userPassword);
            $this->SetCurrentEncoding($siteId);
        }
        public function GetList($arFilter = array(), $arMode = array())
        {
            $this->ClearErrors();
            $request = $this->CreateSOAPRequest("POST", $this->GetPath());
            $request->AddHeader("Content-Type", "text/xml; charset=utf-8");
            $request->AddHeader("SOAPAction", "http://schemas.microsoft.com/exchange/services/2006/messages/FindItem");
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:exchangecalendar2.php

示例3: isset

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
use Bitrix\Main\Localization\Loc;
use Bitrix\Main\IO\Path;
use Bitrix\Sale\Order;
require_once Path::combine(__DIR__, "functions.php");
Loc::loadLanguageFile(Path::combine(__DIR__, "statuses.php"));
$success = isset($_POST['bill_id']) && isset($_POST['amount']) && isset($_POST['ccy']) && isset($_POST['status']) && isset($_POST['error']) && isset($_POST['user']) && isset($_POST['comment']) && isset($_POST['prv_name']) && isset($_POST['command']);
if (!$success) {
    qiwiWalletXmlResponse(QIWI_WALLET_ERROR_CODE_NONE);
}
if (!isset($GLOBALS["SALE_INPUT_PARAMS"])) {
    $GLOBALS["SALE_INPUT_PARAMS"] = array();
}
$authType = CSalePaySystemAction::GetParamValue("AUTHORIZATION");
if ($authType == "OPEN") {
    $login = CSalePaySystemAction::GetParamValue("SHOP_ID");
    $password = CSalePaySystemAction::GetParamValue("NOTICE_PASSWORD");
    if (!qiwiWalletCheckAuth($login, $password)) {
        qiwiWalletXmlResponse(QIWI_WALLET_ERROR_CODE_AUTH);
    }
} else {
    $key = CSalePaySystemAction::GetParamValue("API_PASSWORD");
    if (isset($_SERVER['HTTP_X_API_SIGNATURE']) && strlen($key) > 0) {
        $key = CSalePaySystemAction::GetParamValue("API_PASSWORD");
        $params = $_POST;
        ksort($params);
        $check = base64_encode(sha1($key, implode("|", array_values($params))));
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:result_rec.php

示例4: GetAccessTasks

 public static function GetAccessTasks($binging = 'calendar_section')
 {
     \Bitrix\Main\Localization\Loc::loadLanguageFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/calendar/admin/task_description.php");
     if (is_array(self::$arAccessTask[$binging])) {
         return self::$arAccessTask[$binging];
     }
     $bIntranet = self::IsIntranetEnabled();
     $arTasks = array();
     $res = CTask::GetList(array('ID' => 'asc'), array('MODULE_ID' => 'calendar', 'BINDING' => $binging));
     while ($arRes = $res->Fetch()) {
         if (!$bIntranet && (strtolower($arRes['NAME']) == 'calendar_view_time' || strtolower($arRes['NAME']) == 'calendar_view_title')) {
             continue;
         }
         $name = '';
         if ($arRes['SYS']) {
             $name = GetMessage('TASK_NAME_' . strtoupper($arRes['NAME']));
         }
         if (strlen($name) == 0) {
             $name = $arRes['NAME'];
         }
         $arTasks[$arRes['ID']] = array('name' => $arRes['NAME'], 'title' => $name);
     }
     self::$arAccessTask[$binging] = $arTasks;
     return $arTasks;
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:25,代码来源:calendar.php

示例5: array

		{
			$orderPaidStatus    = 'P';
			$deliveryAssembleStatus  = 'DA';
			$deliveryGoodsStatus     = 'DG';
			$deliveryTransportStatus = 'DT';
			$deliveryShipmentStatus  = 'DS';

			$statusIds = array(
				$orderPaidStatus, $deliveryAssembleStatus, $deliveryGoodsStatus, $deliveryTransportStatus, $deliveryShipmentStatus,
			);

			$statusLanguages = array();

			foreach($arLanguages as $langID)
			{
				Loc::loadLanguageFile($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/sale/lib/status.php', $langID);

				foreach ($statusIds as $statusId)
				{
					if ($statusName = Loc::getMessage("SALE_STATUS_{$statusId}"))
					{
						$statusLanguages[$statusId] []= array(
							'LID'         => $langID,
							'NAME'        => $statusName,
							'DESCRIPTION' => Loc::getMessage("SALE_STATUS_{$statusId}_DESCR"),
						);
					}
				}
			}

			OrderStatus::install(array(
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:step1.php

示例6: includeComponentLang

 /**
  * Function includes language files from within the component directory.
  *
  * <p>For example: $this->includeComponentLang("ajax.php") will include "lang/en/ajax.php" file. </p>
  * <p>Note: component must be inited by initComponent method.</p>
  * @param string $relativePath
  * @param string|bool $lang
  * @return void
  *
  */
 public final function includeComponentLang($relativePath = "", $lang = false)
 {
     if (!$this->__bInited) {
         return null;
     }
     if ($relativePath == "") {
         $relativePath = "component.php";
     }
     $path = $_SERVER["DOCUMENT_ROOT"] . $this->__path . "/" . $relativePath;
     if ($lang === false) {
         \Bitrix\Main\Localization\Loc::loadMessages($path);
     } else {
         \Bitrix\Main\Localization\Loc::loadLanguageFile($path, $lang);
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:25,代码来源:component.php

示例7: array

// get default vat
$defCatVatId = 0;
$dbVat = CCatalogVat::GetListEx(array('SORT' => 'ASC'), array(), false, array('nPageTop' => 1));
if ($arVat = $dbVat->Fetch()) {
    $defCatVatId = $arVat['ID'];
}
unset($arVat, $dbVat);
$defCatVatId = (int) $defCatVatId;
// create base price
$basePriceId = 0;
$basePrice = array();
$dbRes = CCatalogGroup::GetListEx(array(), array("BASE" => "Y"), false, false, array('ID'));
if (!($basePrice = $dbRes->Fetch())) {
    $catalogGroupLangFiles = array();
    foreach ($arActiveLangs as &$language) {
        $catalogGroupLangFiles[$language] = Loc::loadLanguageFile(__FILE__, $language);
    }
    $arFields = array();
    $arFields["USER_LANG"] = array();
    foreach ($arActiveLangs as &$language) {
        if (isset($catalogGroupLangFiles[$language])) {
            $arFields["USER_LANG"][$language] = $catalogGroupLangFiles[$language]['CRM_BASE_PRICE_NAME'];
        }
    }
    unset($language);
    unset($catalogGroupLangFiles);
    $arFields["BASE"] = "Y";
    $arFields["SORT"] = 100;
    $arFields["NAME"] = "BASE";
    $arFields["USER_GROUP"] = array(1, 2);
    $arFields["USER_GROUP_BUY"] = array(1, 2);
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:sale_link.php

示例8: __getLangMessages

 private function __getLangMessages($path, $messID, $langList)
 {
     $result = array();
     if (empty($messID)) {
         return $result;
     }
     if (!is_array($messID)) {
         $messID = array($messID);
     }
     if (!is_array($langList)) {
         $langList = array($langList);
     }
     if (empty($langList)) {
         $languageIterator = LanguageTable::getList(array('select' => array('ID'), 'filter' => array('ACTIVE' => 'Y')));
         while ($oneLanguage = $languageIterator->fetch()) {
             $langList[] = $oneLanguage['ID'];
         }
         unset($oneLanguage, $languageIterator);
     }
     foreach ($langList as &$oneLanguage) {
         $mess = Loc::loadLanguageFile($path, $oneLanguage);
         foreach ($messID as &$oneMess) {
             if (empty($oneMess) || !isset($mess[$oneMess]) || empty($mess[$oneMess])) {
                 continue;
             }
             if (!isset($result[$oneMess])) {
                 $result[$oneMess] = array();
             }
             $result[$oneMess][$oneLanguage] = $mess[$oneMess];
         }
         unset($oneMess, $mess);
     }
     unset($oneLanguage);
     return $result;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:35,代码来源:index.php

示例9: GetUserTypeDescription

 function GetUserTypeDescription()
 {
     \Bitrix\Main\Localization\Loc::loadLanguageFile($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/webdav/classes/usertypewebdav.php");
     return array("USER_TYPE_ID" => "webdav_element_history", "CLASS_NAME" => __CLASS__, "DESCRIPTION" => GetMessage("USER_TYPE_WEBDAV_FILE_HISTORY_DESCRIPTION"), "BASE_TYPE" => "string");
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:5,代码来源:usertypewebdavelementhistory.php

示例10: getTagName

 /**
  * @param $name
  *
  * @return string
  */
 public static function getTagName($name)
 {
     if (static::$lid === null) {
         static::setLanguage(LANGUAGE_ID);
     }
     static $lang = array();
     if (empty($lang[static::$lid])) {
         $lang[static::$lid] = \Bitrix\Main\Localization\Loc::loadLanguageFile($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/sale/general/export.php', static::$lid);
     }
     if (array_key_exists($name, $lang[static::$lid]) && strval(trim($lang[static::$lid][$name])) !== '') {
         $value = $lang[static::$lid][$name];
     } else {
         $value = \Bitrix\Main\Localization\Loc::getMessage($name);
     }
     return $value;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:21,代码来源:export.php

示例11: array

         $adminNotifyIterator = CAdminNotify::GetList(array(), array('MODULE_ID' => 'sale', 'TAG' => 'BASKET_DISCOUNT_CONVERTED'));
         if (!$adminNotifyIterator) {
             $adminNotify = $adminNotifyIterator->Fetch();
         }
         unset($adminNotifyIterator);
         if (empty($adminNotify)) {
             $langMess = array();
             $langList = array();
             $languageIterator = \Bitrix\Main\Localization\LanguageTable::getList(array('select' => array('ID'), 'filter' => array('=ACTIVE' => 'Y')));
             while ($oneLanguage = $languageIterator->fetch()) {
                 $langList[] = $oneLanguage['ID'];
             }
             unset($oneLanguage, $languageIterator);
             $messID = 'SALE_CONVERTER_ADMIN_NOTIFY_CONVERT_BASKET_DISCOUNT';
             foreach ($langList as &$oneLanguage) {
                 $mess = Loc::loadLanguageFile(__FILE__, $oneLanguage);
                 if (!isset($mess[$messID]) || empty($mess[$messID])) {
                     continue;
                 }
                 $langMess[$oneLanguage] = str_replace('#LINK#', '/bitrix/admin/settings.php?lang=' . $oneLanguage . '&mid=sale', $mess[$messID]);
             }
             unset($mess, $oneLanguage);
             reset($langMess);
             $defaultMess = isset($langMess[LANGUAGE_ID]) ? $langMess[LANGUAGE_ID] : current($langMess);
             $fields = array('MESSAGE' => $defaultMess, 'TAG' => 'BASKET_DISCOUNT_CONVERTED', 'MODULE_ID' => 'sale', 'ENABLE_CLOSE' => 'Y', 'PUBLIC_SECTION' => 'N', 'LANG' => $langMess);
             CAdminNotify::Add($fields);
             unset($fields, $langMess, $defaultMess, $langList);
         }
         unset($adminNotify);
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:converter.php

示例12: installCurrencies


//.........这里部分代码省略.........
     if ($languageID == '') {
         $languageID = 'en';
     }
     $currencyList = array();
     $currencySetID = '';
     switch ($languageID) {
         case 'ua':
         case 'de':
         case 'en':
         case 'la':
         case 'tc':
         case 'sc':
         case 'in':
             $currencySetID = $languageID;
             break;
         case 'ru':
             if (!$bitrix24) {
                 $languageIterator = LanguageTable::getList(array('select' => array('ID'), 'filter' => array('=ID' => 'kz', '=ACTIVE' => 'Y')));
                 if ($existLanguage = $languageIterator->fetch()) {
                     $currencySetID = $existLanguage['ID'];
                 }
                 if ($currencySetID == '') {
                     $languageIterator = LanguageTable::getList(array('select' => array('ID'), 'filter' => array('=ID' => 'ua', '=ACTIVE' => 'Y')));
                     if ($existLanguage = $languageIterator->fetch()) {
                         $currencySetID = $existLanguage['ID'];
                     }
                 }
                 unset($existLanguage, $languageIterator);
             }
             if ($currencySetID == '') {
                 $currencySetID = $languageID;
             }
             break;
         default:
             $currencySetID = 'en';
             break;
     }
     $datetimeEntity = new Main\DB\SqlExpression(Main\Application::getConnection()->getSqlHelper()->getCurrentDateTimeFunction());
     switch ($currencySetID) {
         case 'kz':
             $addCurrency = array(array('CURRENCY' => 'KZT', 'NUMCODE' => '398', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1), array('CURRENCY' => 'RUB', 'NUMCODE' => '643', 'AMOUNT' => 4.4, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 4.4), array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 283.17, 'AMOUNT_CNT' => 1, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 283.17), array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 310.78, 'AMOUNT_CNT' => 1, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 310.78));
             break;
         case 'ua':
             $addCurrency = array(array('CURRENCY' => 'UAH', 'NUMCODE' => '980', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1), array('CURRENCY' => 'RUB', 'NUMCODE' => '643', 'AMOUNT' => 3.61, 'AMOUNT_CNT' => 10, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.361), array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 2322.93, 'AMOUNT_CNT' => 100, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 23.2293), array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 2548.19, 'AMOUNT_CNT' => 100, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 25.4819));
             break;
         case 'ru':
             $addCurrency = array(array('CURRENCY' => 'RUB', 'NUMCODE' => '643', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1), array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 64.36, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 64.36), array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 70.59999999999999, 'AMOUNT_CNT' => 1, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 70.59999999999999), array('CURRENCY' => 'UAH', 'NUMCODE' => '980', 'AMOUNT' => 27.69, 'AMOUNT_CNT' => 10, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 2.769), array('CURRENCY' => 'BYR', 'NUMCODE' => '974', 'AMOUNT' => 36.9, 'AMOUNT_CNT' => 10000, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.00369));
             break;
         case 'de':
         case 'la':
             $addCurrency = array(array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1), array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 0.91, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.91), array('CURRENCY' => 'CNY', 'NUMCODE' => '156', 'AMOUNT' => 14.35, 'AMOUNT_CNT' => 100, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.1435), array('CURRENCY' => 'BRL', 'NUMCODE' => '986', 'AMOUNT' => 23.21, 'AMOUNT_CNT' => 100, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.2321), array('CURRENCY' => 'INR', 'NUMCODE' => '356', 'AMOUNT' => 13.97, 'AMOUNT_CNT' => 1000, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.01397));
             break;
         case 'tc':
         case 'sc':
             $addCurrency = array(array('CURRENCY' => 'CNY', 'NUMCODE' => '156', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1), array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 6.36, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 6.36), array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 6.97, 'AMOUNT_CNT' => 1, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 6.97), array('CURRENCY' => 'BRL', 'NUMCODE' => '986', 'AMOUNT' => 1.61, 'AMOUNT_CNT' => 1, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 1.61), array('CURRENCY' => 'INR', 'NUMCODE' => '356', 'AMOUNT' => 9.74, 'AMOUNT_CNT' => 100, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.09737));
             break;
         case 'in':
             $addCurrency = array(array('CURRENCY' => 'INR', 'NUMCODE' => '356', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1), array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 65.31, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 65.31), array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 71.56, 'AMOUNT_CNT' => 1, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 71.56), array('CURRENCY' => 'CNY', 'NUMCODE' => '156', 'AMOUNT' => 10.27, 'AMOUNT_CNT' => 1, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 10.27), array('CURRENCY' => 'BRL', 'NUMCODE' => '986', 'AMOUNT' => 16.56, 'AMOUNT_CNT' => 1, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 16.56));
             break;
         case 'br':
             $addCurrency = array(array('CURRENCY' => 'BRL', 'NUMCODE' => '986', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1), array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 3.9, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 3.9), array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 4.29, 'AMOUNT_CNT' => 1, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 4.29), array('CURRENCY' => 'CNY', 'NUMCODE' => '156', 'AMOUNT' => 61.44, 'AMOUNT_CNT' => 100, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.6143999999999999), array('CURRENCY' => 'INR', 'NUMCODE' => '356', 'AMOUNT' => 5.99, 'AMOUNT_CNT' => 100, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.0599));
             break;
         default:
         case 'en':
             $addCurrency = array(array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1), array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 1.1, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 1.1), array('CURRENCY' => 'CNY', 'NUMCODE' => '156', 'AMOUNT' => 15.73, 'AMOUNT_CNT' => 100, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.1573), array('CURRENCY' => 'BRL', 'NUMCODE' => '986', 'AMOUNT' => 25.35, 'AMOUNT_CNT' => 100, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.2535), array('CURRENCY' => 'INR', 'NUMCODE' => '356', 'AMOUNT' => 15.31, 'AMOUNT_CNT' => 1000, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.01531));
             break;
     }
     foreach ($addCurrency as &$fields) {
         $fields['CREATED_BY'] = null;
         $fields['MODIFIED_BY'] = null;
         $fields['DATE_CREATE'] = $datetimeEntity;
         $fields['DATE_UPDATE'] = $datetimeEntity;
         $currencyResult = \Bitrix\Currency\CurrencyTable::add($fields);
         if ($currencyResult->isSuccess()) {
             $currencyList[] = $fields['CURRENCY'];
         }
     }
     unset($currencyResult, $fields);
     if (!empty($currencyList)) {
         Option::set('currency', 'installed_currencies', implode(',', $currencyList), '');
         $languageIterator = LanguageTable::getList(array('select' => array('ID'), 'filter' => array('=ACTIVE' => 'Y')));
         while ($existLanguage = $languageIterator->fetch()) {
             $messList = Loc::loadLanguageFile($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/currency/install_lang.php', $existLanguage['ID']);
             foreach ($currencyList as &$oneCurrency) {
                 $fields = array('LID' => $existLanguage['ID'], 'CURRENCY' => $oneCurrency, 'THOUSANDS_SEP' => false, 'DECIMALS' => 2, 'HIDE_ZERO' => 'Y', 'FORMAT_STRING' => $messList['CUR_INSTALL_' . $oneCurrency . '_FORMAT_STRING'], 'FULL_NAME' => $messList['CUR_INSTALL_' . $oneCurrency . '_FULL_NAME'], 'DEC_POINT' => $messList['CUR_INSTALL_' . $oneCurrency . '_DEC_POINT'], 'THOUSANDS_VARIANT' => $messList['CUR_INSTALL_' . $oneCurrency . '_THOUSANDS_SEP'], 'CREATED_BY' => null, 'MODIFIED_BY' => null, 'DATE_CREATE' => $datetimeEntity, 'TIMESTAMP_X' => $datetimeEntity);
                 $resultCurrencyLang = \Bitrix\Currency\CurrencyLangTable::add($fields);
                 unset($resultCurrencyLang);
             }
             unset($oneCurrency, $messList);
         }
         unset($existLanguage, $languageIterator);
         if (!$bitrix24) {
             $checkDate = Main\Type\DateTime::createFromTimestamp(strtotime('tomorrow 00:01:00'));
             CAgent::AddAgent('\\Bitrix\\Currency\\CurrencyTable::currencyBaseRateAgent();', 'currency', 'Y', 86400, '', 'Y', $checkDate->toString(), 100, false, true);
             unset($checkDate);
         }
         \Bitrix\Currency\CurrencyManager::clearCurrencyCache();
     }
     unset($datetimeEntity);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:index.php

示例13: installCurrencies


//.........这里部分代码省略.........
					array('CURRENCY' => 'RUB', 'NUMCODE' => '643', 'AMOUNT' => 4.00, 'AMOUNT_CNT' => 10, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.4),
					array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 2355.70, 'AMOUNT_CNT' => 100, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 23.557),
					array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 2579.49, 'AMOUNT_CNT' => 100, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 25.7949)
				);
				break;
			case 'ru':
				$addCurrency = array(
					array('CURRENCY' => 'RUB', 'NUMCODE' => '643', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1),
					array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 57.39, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 57.39),
					array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 62.77, 'AMOUNT_CNT' => 1, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 62.77),
					array('CURRENCY' => 'UAH', 'NUMCODE' => '980', 'AMOUNT' => 24.53, 'AMOUNT_CNT' => 10, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 2.453),
					array('CURRENCY' => 'BYR', 'NUMCODE' => '974', 'AMOUNT' => 39.44, 'AMOUNT_CNT' => 10000, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.003944)
				);
				break;
			case 'de':
			case 'la':
				$addCurrency = array(
					array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1),
					array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 0.91, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.91),
					array('CURRENCY' => 'CNY', 'NUMCODE' => '156', 'AMOUNT' => 14.65, 'AMOUNT_CNT' => 100, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.1465),
					array('CURRENCY' => 'BRL', 'NUMCODE' => '986', 'AMOUNT' => 29.12, 'AMOUNT_CNT' => 100, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.2912),
					array('CURRENCY' => 'INR', 'NUMCODE' => '356', 'AMOUNT' => 14.59, 'AMOUNT_CNT' => 1000, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.01459)
				);
				break;
			case 'tc':
			case 'sc':
				$addCurrency = array(
					array('CURRENCY' => 'CNY', 'NUMCODE' => '156', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1),
					array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 6.21, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.1610),
					array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 6.75, 'AMOUNT_CNT' => 1, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.1482),
					array('CURRENCY' => 'BRL', 'NUMCODE' => '986', 'AMOUNT' => 1.93, 'AMOUNT_CNT' => 1, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.5181),
					array('CURRENCY' => 'INR', 'NUMCODE' => '356', 'AMOUNT' => 9,94, 'AMOUNT_CNT' => 100, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.0994)
				);
				break;
			default:
			case 'en':
				$addCurrency = array(
					array('CURRENCY' => 'USD', 'NUMCODE' => '840', 'AMOUNT' => 1, 'AMOUNT_CNT' => 1, 'SORT' => 100, 'BASE' => 'Y', 'CURRENT_BASE_RATE' => 1),
					array('CURRENCY' => 'EUR', 'NUMCODE' => '978', 'AMOUNT' => 1.09, 'AMOUNT_CNT' => 1, 'SORT' => 200, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 1.09),
					array('CURRENCY' => 'CNY', 'NUMCODE' => '156', 'AMOUNT' => 16.09, 'AMOUNT_CNT' => 100, 'SORT' => 300, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.1609),
					array('CURRENCY' => 'BRL', 'NUMCODE' => '986', 'AMOUNT' => 31.24, 'AMOUNT_CNT' => 100, 'SORT' => 400, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.3124),
					array('CURRENCY' => 'INR', 'NUMCODE' => '356', 'AMOUNT' => 16.02, 'AMOUNT_CNT' => 1000, 'SORT' => 500, 'BASE' => 'N', 'CURRENT_BASE_RATE' => 0.01602)
				);
				break;
		}
		foreach ($addCurrency as &$fields)
		{
			$fields['CREATED_BY'] = null;
			$fields['MODIFIED_BY'] = null;
			$fields['DATE_CREATE'] = $datetimeEntity;
			$fields['DATE_UPDATE'] = $datetimeEntity;
			$currencyResult = \Bitrix\Currency\CurrencyTable::add($fields);
			if ($currencyResult->isSuccess())
				$currencyList[] = $fields['CURRENCY'];
		}
		unset($currencyResult, $fields);

		if (!empty($currencyList))
		{
			Option::set('currency', 'installed_currencies', implode(',', $currencyList), '');
			$languageIterator = LanguageTable::getList(array(
				'select' => array('ID'),
				'filter' => array('=ACTIVE' => 'Y')
			));
			while ($existLanguage = $languageIterator->fetch())
			{
				$messList = Loc::loadLanguageFile($_SERVER['DOCUMENT_ROOT'].'/bitrix/modules/currency/install_lang.php', $existLanguage['ID']);
				foreach($currencyList as &$oneCurrency)
				{
					$fields = array(
						'LID' => $existLanguage['ID'],
						'CURRENCY' => $oneCurrency,
						'THOUSANDS_SEP' => false,
						'DECIMALS' => 2,
						'HIDE_ZERO' => 'Y',
						'FORMAT_STRING' => $messList['CUR_INSTALL_'.$oneCurrency.'_FORMAT_STRING'],
						'FULL_NAME' => $messList['CUR_INSTALL_'.$oneCurrency.'_FULL_NAME'],
						'DEC_POINT' => $messList['CUR_INSTALL_'.$oneCurrency.'_DEC_POINT'],
						'THOUSANDS_VARIANT' => $messList['CUR_INSTALL_'.$oneCurrency.'_THOUSANDS_SEP'],
						'CREATED_BY' => null,
						'MODIFIED_BY' => null,
						'DATE_CREATE' => $datetimeEntity,
						'TIMESTAMP_X' => $datetimeEntity
					);
					$resultCurrencyLang = \Bitrix\Currency\CurrencyLangTable::add($fields);
					unset($resultCurrencyLang);
				}
				unset($oneCurrency, $messList);
			}
			unset($existLanguage, $languageIterator);
			if (!$bitrix24)
			{
				$checkDate = Main\Type\DateTime::createFromTimestamp(strtotime('tomorrow 00:01:00'));;
				CAgent::AddAgent('\Bitrix\Currency\CurrencyTable::currencyBaseRateAgent();', 'currency', 'Y', 86400, '', 'Y', $checkDate->toString(), 100, false, true);
				unset($checkDate);
			}
			\Bitrix\Currency\CurrencyManager::clearCurrencyCache();
		}
		unset($datetimeEntity);
	}
开发者ID:nycmic,项目名称:bittest,代码行数:101,代码来源:index.php

示例14: getNamesSavedSection

 protected function getNamesSavedSection()
 {
     static $array = null;
     if ($array !== null) {
         return $array;
     }
     $names = array();
     foreach ($this->getLanguageList() as $lang) {
         \Bitrix\Main\Localization\Loc::loadLanguageFile($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/webdav/classes/general.php', $lang["LID"]);
         $names[$lang["LID"]] = \Bitrix\Main\Localization\Loc::getMessage('WD_SAVED', null, $lang["LID"]);
     }
     unset($lang);
     return $names;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:14,代码来源:smart_migration_webdav.php

示例15: getLangMessages

 /**
  * Gets lang messages
  * @return array
  */
 public function getLangMessages()
 {
     return Loc::loadLanguageFile(Path::normalize(__FILE__));
 }
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:8,代码来源:configmap.php


注:本文中的Bitrix\Main\Localization\Loc::loadLanguageFile方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。