Russian TYPO3 community

Russian TYPO3 community (http://forum.typo3.ru/index.php)
-   Установка (http://forum.typo3.ru/forumdisplay.php?f=13)
-   -   Call to undefined method TYPO3\CMS\Core\Utility\GeneralUtility::readLLXMLfi le() (http://forum.typo3.ru/showthread.php?t=10804)

Андрей Аксенов 28.06.2013 13:32

Call to undefined method TYPO3\CMS\Core\Utility\GeneralUtility::readLLXMLfi le()
 
Решение проблемы:
Ошибка Call to undefined method TYPO3\CMS\Core\Utility\GeneralUtility::readLLXMLfi le()

/**
* Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
*
* @return The array with language labels
*/
function includeLocalLang() {
$llFile = t3lib_extMgm::extPath('name_of_extension').'locall ang.xml';
$LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);

return $LOCAL_LANG;
}

Заменить на, обратить внимание на name_of_extension - заменить на название расширения

/**
* Reads the [extDir]/locallang.xml and returns the $LOCAL_LANG array found in that file.
*
* @return The array with language labels
*/
function includeLocalLang() {
$llFile = t3lib_extMgm::extPath('name_of_extension') . 'locallang.xml';

$version = class_exists('t3lib_utility_VersionNumber')
? t3lib_utility_VersionNumber::convertVersionNumberT oInteger(TYPO3_version)
: t3lib_div::int_from_ver(TYPO3_version);
if ($version >= 4007000) {
$object = t3lib_div::makeInstance('t3lib_l10n_parser_Llxml') ;
$LOCAL_LANG = $object->getParsedData($llFile, $GLOBALS['LANG']->lang);
} else {
$LOCAL_LANG = t3lib_div::readLLXMLfile($llFile, $GLOBALS['LANG']->lang);
}

return $LOCAL_LANG;
}

Написал здесь, так как в FAQ писать не могу, а подходящей темы для решения ошибок на форуме нет! Модераторы, если прочитаете, создайте специальную ветку по решению возникающих проблем, так как к теме Установка это подходит лишь поверхностно...


Часовой пояс GMT +4, время: 20:15.

Работает на vBulletin® версия 3.8.1.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot