Поддержка серверов

TRANSLATE: методы, функции, константы класса Битрикс


Блог разработчика

9 августа 2016 ResizeImageGet и простой водяной знак налету

Сегодня поговорим о том как проще всего воткнуть водяной знак на картинки в Битрикс. Например, на все изображения каталога.

21 июля 2016 Добавление вкладки в CRM коробки Битрикс24

В этом посте я покажу, как легко и просто добавить вкладку в сущность CRM. И не просто добавить, а вывести там свой контент.

21 июля 2016 Как просто обращаться из коробки Битрикс24 на сайт на базе Битрикс

К примеру вам хочется внутренним скриптом дернуть с сайта-магазина информацию, которая там, в свою очередь, закрыта некоторыми правами. Например, админскими. Можно конечно мутить свой REST, или иной формат общения, но проще всего воспользоваться штатным инструментом:

Константы модуля translate

КонстантаПроверяется
BX_UTFConfig::isUtfMode
START_EXEC_TIMETimer::startTimer

Список функций и методов модуля translate

Метод
GetLangDirs($arDirs, $showTranslationDifferences = false)
GetTDirList($path, $subDirs = false, $restructLanguageList = array())
GetTCSVArray($filterKeyIndex, $targetEncoding = '', $restructLanguageList = array())
SaveTCSVFile($filePath, $encodingIn, $rewriteMode, $mergeMode, &$errors)
GetTLangFiles($path, $IS_LANG_DIR = false)
TSEARCH($arFile, &$count)
TR_BACKUP($langFile)
CTranslateEventHandlers::TranslatOnPanelCreate()
CTranslateUtils::setLanguageList($languages = self::LANGUAGES_DEFAULT, $customList = array())
CTranslateUtils::CopyMessage($code, $fileFrom, $fileTo, $newCode = '')
CTranslateUtils::FindAndCopy($sourceDir, $lang, $pattern, $destinationFile)
GetPhraseCounters($arCommon, $entry, $enabledLanguages)
removePhrasesByMasterFile($masterLanguage, $listIds, &$errorCollection)
saveTranslationFile($langFileName, $phrases, &$errorCollection)
IndexCommand::configure()
IndexCommand::execute(Console\Input\InputInterface $input, Console\Output\OutputInterface $output)
Panel::onPanelCreate()
PathIndexCollection::configure()
PathIndexCollection::switchArrangeMode($flag)
PathIndexCollection::countItemsToProcess(Translate\Filter $filter = null)
PathIndexCollection::collect(Translate\Filter $filter = null, Translate\Controller\ITimeLimit $timer = null, Translate\Filter $seek = null)
PathIndexCollection::collectFilePath($relPath)
PathIndexCollection::constructAncestorsByPath($path)
PathIndexCollection::getImmediateChildren($parentId)
PathIndexCollection::getAncestors($nodeId, $topNodeId = -1)
PathIndexCollection::removeNonLang(Translate\Filter $filter = null)
PathIndexCollection::arrangeTree()
PathIndexCollection::purge(Translate\Filter $filter = null, $recursively = true)
PathIndexCollection::unvalidate(Translate\Filter $filter = null, $recursively = true)
PathIndexCollection::collectModuleAssignment(Translate\Filter $filter = null)
PathIndexCollection::collectAssignment(Translate\Filter $filter = null)
FileDiffCollection::configure()
FileDiffCollection::countItemsToProcess(Translate\Filter $filter = null)
FileDiffCollection::collect(Translate\Filter $filter = null, Translate\Controller\ITimeLimit $timer = null, Translate\Filter $seek = null)
FileDiffCollection::purge(Translate\Filter $filter = null)
bulkAdd(array $rows, $primary = null)
bulkUpdate(array $fields, array $filter = [])
bulkDelete(array $filter = [])
prepareWhere(array $filterFields, array $filterAlias = array())
FileDiffTable::getTableName()
FileDiffTable::getObjectClass()
FileDiffTable::getCollectionClass()
FileDiffTable::getMap()
FileDiffTable::purge(Translate\Filter $filter = null)
FileDiffTable::processFilter(Translate\Filter $filter = null)
FileIndexTable::getTableName()
FileIndexTable::getObjectClass()
FileIndexTable::getCollectionClass()
FileIndexTable::getMap()
FileIndexTable::purge(Translate\Filter $filter = null, $recursively = true)
FileIndexTable::processFilter(Translate\Filter $filter = null)
PathLangTable::getTableName()
PathLangTable::getMap()
PathLangTable::purge(Translate\Filter $filter = null)
PathIndexTable::getTableName()
PathIndexTable::getObjectClass()
PathIndexTable::getCollectionClass()
PathIndexTable::getMap()
PathIndexTable::beforeInsertNode($parentId)
PathIndexTable::afterDeleteNode($leftMargin, $rightMargin)
PathIndexTable::arrangeTree($id, $cnt = 0, $depth = 0)
PathIndexTable::removeNonLang(array $filter = [])
PathIndexTable::purge(Translate\Filter $filter = null, $recursively = true)
PathIndexTable::processFilter(Translate\Filter $filter = null)
PhraseIndexTable::getTableName()
PhraseIndexTable::getObjectClass()
PhraseIndexTable::getCollectionClass()
PhraseIndexTable::getMap()
PhraseIndexTable::purge(Translate\Filter $filter = null)
PhraseIndexTable::processFilter(Translate\Filter $filter = null)
FileIndex::createByFile(Main\IO\File $file)
FileIndexSearch::query($params = [])
FileIndexSearch::getCount($filterIn)
FileIndexSearch::getList($params)
FileIndexSearch::processParams($params)
PhraseIndexCollection::countItemsToProcess(Translate\Filter $filter = null)
PhraseIndexCollection::collect(Translate\Filter $filter = null, Translate\Controller\ITimeLimit $timer = null, Translate\Filter $seek = null)
PhraseIndexCollection::purge(Translate\Filter $filter = null)
PhraseIndexCollection::getPhraseByCode($code)
PathIndex::loadByPath($path)
PathIndex::detectModuleId()
PathIndex::detectAssignment()
FileIndexCollection::configure()
FileIndexCollection::countItemsToProcess(Translate\Filter $filter = null)
FileIndexCollection::collect(Translate\Filter $filter = null, Translate\Controller\ITimeLimit $timer = null, Translate\Filter $seek = null)
FileIndexCollection::purge(Translate\Filter $filter = null, $recursively = true)
FileIndexCollection::unvalidate(Translate\Filter $filter = null)
PhraseIndexSearch::query($params = [])
PhraseIndexSearch::getCount($filterIn)
PhraseIndexSearch::getList($params)
PhraseIndexSearch::processParams($params)
PathLangCollection::configure()
PathLangCollection::countItemsToProcess(Translate\Filter $filter = null)
PathLangCollection::collect(Translate\Filter $filter = null, Translate\Controller\ITimeLimit $timer = null, Translate\Filter $seek = null)
PathLangCollection::purge(Translate\Filter $filter = null)
Settings::instantiateByPath($fullPath)
Settings::getOptions($langPath = '')
Settings::load()
Settings::save()
Settings::offsetExists($code)
Settings::offsetGet($code)
Settings::offsetSet($code, $phrase)
Settings::offsetUnset($code)
Settings::current()
Settings::next()
Settings::key()
Settings::valid()
Settings::rewind()
Settings::count($allowDirectFileAccess = false)
StringHelper::getLength($str, $encoding = null)
StringHelper::getSubstring($str, $start, $length, $encoding = null)
StringHelper::getPosition($haystack, $needle, $offset = 0, $encoding = null)
StringHelper::changeCaseToLower($str, $encoding = null)
StringHelper::changeCaseToUpper($str, $encoding = null)
StringHelper::htmlSpecialChars($string, $flags = ENT_COMPAT, $encoding = null)
Filter::__construct($param = null)
Filter::__isset($code)
Filter::__get($code)
Filter::__set($code, $value)
Filter::__unset($code)
Filter::current()
Filter::next()
Filter::key()
Filter::valid()
Filter::rewind()
Filter::serialize()
Filter::unserialize($data)
Filter::getTabId($increment = true)
Filter::store()
Filter::restore($id)
Filter::offsetExists($code)
Filter::offsetGet($code)
Filter::offsetSet($code, $param)
Filter::offsetUnset($code)
Filter::count()
Path::tidy($path)
Path::secure($path)
Path::isLangDir($path, $additionalCheck = false)
Path::extractLangId($path)
Path::replaceLangId($path, $langId)
Path::removeLangId($path, $langs = null)
Path::addLangId($path, $langId, $langs = null)
Path::checkCreatePath($path)
CsvFile::read($length)
CsvFile::write($content)
CsvFile::close()
CsvFile::openLoad()
CsvFile::openWrite($mode = Main\IO\FileStreamOpenMode::WRITE)
CsvFile::setUtf8Bom($mark = self::BOM_TYPE_UTF8)
CsvFile::hasUtf8Bom()
CsvFile::prefaceWithUtf8Bom($exists = true)
CsvFile::checkUtf8Bom()
CsvFile::setFieldsType($fieldsType = self::FIELDS_TYPE_WITH_DELIMITER)
CsvFile::setFieldDelimiter($fieldDelimiter = self::DELIMITER_TZP)
CsvFile::setRowDelimiter($rowDelimiter = self::LINE_DELIMITER_WIN)
CsvFile::setFirstHeader($firstHeader = false)
CsvFile::getFirstHeader()
CsvFile::setWidthMap($mapFields)
CsvFile::fetchDelimiter()
CsvFile::fetchWidth()
CsvFile::fetch()
CsvFile::incrementCurrentPosition()
CsvFile::moveFirst()
CsvFile::getPos()
CsvFile::setPos($position = 0)
CsvFile::put(array $fields)
File::generateTemporalFile($prefix, $suffix = '.tmp', $timeToLive = 1)
File::openLoad()
File::openWrite()
File::read($length)
File::write($content)
File::close()
FileSystemHelper::getFolderList($path, $mask = '*')
FileSystemHelper::getFileList($path, $mask = '*.php')
Archiver::__construct($path, $siteId = null)
Archiver::libAvailable()
Archiver::setOptions($options)
Archiver::setSeekPosition($seekPath)
Archiver::getSeekPosition()
Archiver::getProcessedFileCount()
Archiver::pack(Translate\IO\Directory $directory, $seekPath = '')
Archiver::extract(Translate\IO\Directory $target)
Directory::__construct($path, $siteId = null)
Directory::generateTemporalDirectory($prefix, $timeToLive = 1)
Directory::copy(Main\IO\Directory $target, $reWrite = true, $recursive = false, $convertEncoding = false, $sourceEncoding = '', $targetEncoding = '')
Directory::copyLangOnly(Main\IO\Directory $target, $languageId, $convertEncoding = false, $sourceEncoding = '', $targetEncoding = '')
Directory::wipe()
File::instantiateByPath($path)
File::instantiateByIndex(Index\FileIndex $fileIndex)
File::instantiateByIoFile(Main\IO\File $fileIn)
File::getLangId()
File::setLangId($languageId)
File::getSourceEncoding()
File::setSourceEncoding($encoding)
File::getOperatingEncoding()
File::setOperatingEncoding($encoding)
File::lint(N/A)
File::load()
File::save()
File::removeEmptyParents()
File::backup()
File::getFileIndex()
File::updatePhraseIndex()
File::deletePhraseIndex()
File::getPhraseIndexCollection()
File::offsetExists($code)
File::offsetGet($code)
File::offsetSet($code, $phrase)
File::offsetUnset($code)
File::sortPhrases()
File::getPhrases()
File::getCodes()
File::current()
File::next()
File::key()
File::valid()
File::rewind()
File::count($allowDirectFileAccess = false)
File::getContents()
File::putContents($data, $flags = self::REWRITE)
File::countExcess(self $ethalon)
File::countDeficiency(self $ethalon)
ComponentBase::checkModuleAvailability()
ComponentBase::hasUserPermissionView($user)
ComponentBase::hasUserPermissionEdit($user)
ComponentBase::hasUserPermissionEditPhp($user)
ComponentBase::checkPermissionView()
ComponentBase::checkPermissionEdit()
ComponentBase::checkPermissionEditPhp()
ComponentBase::prepareParams()
ComponentBase::getLanguages()
ComponentBase::getLanguagesTitle($languageIds)
ComponentBase::getCompatibleLanguages()
ComponentBase::detectTabId()
ComponentBase::detectStartingPath()
ComponentBase::&getParams()
ComponentBase::&getResult()
ComponentBase::getUser()
ComponentBase::getApplication()
ComponentBase::isAjaxRequest()
ComponentBase::sendJsonResponse($response)
ComponentBase::clearSavedOptions($category, $nameMask)
ComponentBase::detectPathBack($path)
ComponentBase::generateChainLinks($path)
Permission::isAllowPath($path)
Permission::canEditSource($checkUser)
Permission::isAdmin($checkUser)
Permission::canView($checkUser)
Permission::canEdit($checkUser)
Config::getOption($optionName)
Config::getModuleDefault($optionName)
Config::getDefaultLanguages()
Config::isUtfMode()
Config::getAllowedEncodings()
Config::getEncodingName($encoding)
Config::getAliasEncoding($encoding)
Config::getCultureEncoding($languageId)
Config::getLanguages()
Config::getEnabledLanguages()
Config::getLanguagesTitle($languageIds)
Config::getAvailableLanguages()
Config::getAvailableDefaultLanguages()
Config::getTranslationRepositoryLanguages()
Config::getInitPath()
Config::getDefaultPath()
Config::allowCalculateDifference()
Config::needToBackUpFiles()
Config::getBackupFolder()
Config::needToSortPhrases()
Config::getNonSortPhraseLanguages()
addError(Main\Error $error)
addErrors(array $errors)
getErrors()
getErrorByCode($code)
getLastError()
getFirstError()
hasErrors()
hasError($code)
Action::hasErrors()
Collector::configureActions()
Collector::cancelAction()
CollectFileIndex::__construct($name, Main\Engine\Controller $controller, $config = array())
CollectFileIndex::run($path = '')
CollectFileIndex::runIndexing(array $params)
CollectPhraseIndex::__construct($name, Main\Engine\Controller $controller, $config = array())
CollectPhraseIndex::run($path = '')
CollectPhraseIndex::runIndexing(array $params)
CollectPathIndex::__construct($name, Main\Engine\Controller $controller, $config = array())
CollectPathIndex::run($path = '')
CollectPathIndex::runIndexing(array $params)
Purge::run($path = '')
CollectLangPath::__construct($name, Main\Engine\Controller $controller, $config = array())
CollectLangPath::run($path = '')
CollectLangPath::runIndexing()
CleanEthalon::__construct($name, Main\Engine\Controller $controller, $config = array())
CleanEthalon::run($pathList)
CleanEthalon::runClearing()
CleanEthalon::cleanLangFile($relLangPath)
CleanEthalon::getProgressParameterOptionName()
WipeEmpty::__construct($name, Main\Engine\Controller $controller, $config = array())
WipeEmpty::run($pathList)
WipeEmpty::runWiping()
WipeEmpty::removeEmptyParents($langFullPath)
WipeEmpty::getProgressParameterOptionName()
Operation::__construct($name, Main\Engine\Controller $controller, $config = array())
Operation::updateLangFile(Translate\File $langFile)
Operation::deleteLangFile(Translate\File $langFile)
Operation::updatePhraseIndex(Translate\File $langFile)
Operation::deletePhraseIndex(Translate\File $langFile)
Operation::lookThroughLangFolder($langPath)
SaveSource::run($file = '')
File::configureActions()
File::cancelAction()
SaveFile::run($file = '')
SaveFile::generateFieldName($phraseId, $suffix = '', $prefix = '')
Pack::__construct($name, Main\Engine\Controller $controller, $config = array())
Pack::run()
Pack::runPacking()
Pack::generateDownloadLink()
Pack::generateExportFileName()
Pack::getDownloadingParameters()
Pack::getProgressParameterOptionName()
ApplyPublic::__construct($name, Main\Engine\Controller $controller, $config = array())
ApplyPublic::run()
ApplyPublic::runApplying()
ApplyPublic::lookThroughTmpFolder($tmpFolderFullPath)
ApplyPublic::getProgressParameterOptionName()
Extract::__construct($name, Main\Engine\Controller $controller, $config = array())
Extract::run()
Extract::getProgressParameterOptionName()
Collect::__construct($name, Main\Engine\Controller $controller, $config = array())
Collect::run()
Collect::runCollecting()
Collect::lookThroughLangFolder($langFolderRelPath)
Collect::getProgressParameterOptionName()
Apply::__construct($name, Main\Engine\Controller $controller, $config = array())
Apply::run()
Apply::runApplying()
Apply::lookThroughTmpFolder($tmpFolderFullPath)
Apply::getProgressParameterOptionName()
Grabber::configureActions()
Grabber::init()
Grabber::uploadAction()
Grabber::moveUploadedFile($postedFile, $suffix = '.tar', $timeToLive = 3)
Grabber::finalizeAction()
Grabber::purgeAction()
Grabber::cancelAction()
Grabber::downloadAction()
Grabber::getProgressParameterOptionName()
Grabber::getMaxUploadSize()
Controller::processBeforeAction(Main\Engine\Action $action)
Controller::hasErrors()
CheckPermission::__construct($checkLevel = 'auth')
CheckPermission::onBeforeAction(Main\Event $event)
ExportFileList::__construct($name, Main\Engine\Controller $controller, $config = array())
ExportFileList::run($path = '', $runBefore = false)
ExportFileList::runExporting(array $params)
Csv::configureActions()
Csv::init()
Csv::exportAction($tabId, $path = '')
Csv::detectAction($path)
Csv::purgeAction($tabId)
Csv::cancelAction($tabId)
Csv::generateDownloadLink($params)
Csv::downloadAction($tabId)
ExportAction::__construct($name, Main\Engine\Controller $controller, $config = array())
ExportAction::createExportTempFile()
ExportAction::configureExportCsvFile(Translate\IO\CsvFile $csvFile)
ExportAction::generateExportFileName($path, $languages)
ExportAction::getDownloadingParameters()
ExportAction::mergeLangFiles($langFilePath, $fullLangFilePaths, $collectUntranslated = false, $filterByCodeList = [])
ExportAction::lookThroughLangFolder($langPath)
ExportFileSearch::__construct($name, Main\Engine\Controller $controller, $config = array())
ExportFileSearch::run($path = '', $runBefore = false)
ExportFileSearch::runExporting(array $params)
ExportFileSearch::processFilter($path)
ExportFile::run($path = '', $runBefore = false)
ExportPhraseSearch::__construct($name, Main\Engine\Controller $controller, $config = array())
ExportPhraseSearch::run($path = '', $runBefore = false)
ExportPhraseSearch::runExporting(array $params)
ExportPhraseSearch::processFilter($path)
ExportPath::__construct($name, Main\Engine\Controller $controller, $config = array())
ExportPath::run($path = '', $runBefore = false)
ExportPath::runExporting()
Timer::__construct($timeLimit = -1)
Timer::startTimer()
Timer::hasTimeLimitReached()
Timer::getTimeLimit()
Timer::setTimeLimit($timeLimit)
getProgressParameterOptionName()
keepField($fieldName)
restoreProgressParameters()
saveProgressParameters()
getProgressParameters()
clearProgressParameters()
onBeforeRun()
performStep($action, array $params = array())
declareAccomplishment($flag = true)
hasProcessCompleted()
instanceTimer()
startTimer()
hasTimeLimitReached()
Csv::importAction()
Csv::indexAction()
Csv::uploadAction()
Csv::moveUploadedFile($postedFile, $suffix = '.csv', $timeToLive = 3)
Csv::finalizeAction()
ImportCsv::__construct($name, Main\Engine\Controller $controller, $config = array())
ImportCsv::run($runBefore = false)
ImportCsv::runImporting()
ImportCsv::verifyCsvFile()
IndexCsv::__construct($name, Main\Engine\Controller $controller, $config = array())
IndexCsv::run($runBefore = false)
IndexCsv::runIndexing()
IndexCsv::verifyCsvFile()
translate::__construct()
translate::InstallDB()
translate::UnInstallDB()
translate::InstallEvents()
translate::UnInstallEvents()
translate::InstallFiles()
translate::UnInstallFiles()
translate::DoInstall()
translate::DoUninstall()