-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathext_localconf.php
More file actions
27 lines (24 loc) · 1.28 KB
/
ext_localconf.php
File metadata and controls
27 lines (24 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
defined('TYPO3') or die();
$boot = static function () {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_pagerenderer.php']['render-postProcess']['crowdin-inline-translation']
= \FriendsOfTYPO3\Crowdin\Hooks\PageRendererHook::class . '->run';
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Core\Localization\LanguageService::class] = [
'className' => \FriendsOfTYPO3\Crowdin\Xclass\LanguageServiceXclassed::class,
];
$typo3Version = (new \TYPO3\CMS\Core\Information\Typo3Version())->getMajorVersion();
if ($typo3Version >= 14) {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Core\Localization\LanguageServiceFactory::class] = [
'className' => \FriendsOfTYPO3\Crowdin\Xclass\V14\LanguageServiceFactoryXclassed::class,
];
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Core\Localization\DateFormatter::class] = [
'className' => \FriendsOfTYPO3\Crowdin\Xclass\V14\DateFormatterXclassed::class,
];
} else {
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'][\TYPO3\CMS\Core\Localization\LanguageServiceFactory::class] = [
'className' => \FriendsOfTYPO3\Crowdin\Xclass\V12\LanguageServiceFactoryXclassed::class,
];
}
};
$boot();
unset($boot);