|
4 | 4 |
|
5 | 5 | use Lochmueller\LanguageDetection\Service\LocaleCollectionSortService;
|
6 | 6 | use Lochmueller\LanguageDetection\Service\TcaLanguageSelection;
|
7 |
| -use TYPO3\CMS\Core\Information\Typo3Version; |
8 |
| -use TYPO3\CMS\Core\Utility\GeneralUtility; |
9 | 7 | use TYPO3\CMS\Core\Utility\HttpUtility;
|
10 |
| -use TYPO3\CMS\Core\Utility\VersionNumberUtility; |
11 | 8 |
|
12 | 9 | $GLOBALS['SiteConfiguration']['site']['columns']['enableLanguageDetection'] = [
|
13 | 10 | 'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:enable',
|
|
69 | 66 | ],
|
70 | 67 | ];
|
71 | 68 |
|
72 |
| -$version11Branch = VersionNumberUtility::convertVersionNumberToInteger(GeneralUtility::makeInstance(Typo3Version::class)->getBranch()) >= VersionNumberUtility::convertVersionNumberToInteger('11.2'); |
73 |
| - |
74 |
| -if ($version11Branch) { |
75 |
| - $GLOBALS['SiteConfiguration']['site']['columns']['fallbackDetectionLanguage'] = [ |
76 |
| - 'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:fallback.detection.language', |
77 |
| - 'config' => [ |
78 |
| - 'type' => 'select', |
79 |
| - 'renderType' => 'selectSingle', |
80 |
| - 'itemsProcFunc' => TcaLanguageSelection::class . '->get', |
81 |
| - ], |
82 |
| - ]; |
83 |
| -} else { |
84 |
| - $GLOBALS['SiteConfiguration']['site']['columns']['fallbackDetectionLanguage'] = [ |
85 |
| - 'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:fallback.detection.language', |
86 |
| - 'config' => [ |
87 |
| - 'type' => 'select', |
88 |
| - 'renderType' => 'selectSingle', |
89 |
| - 'special' => 'languages', |
90 |
| - 'items' => [ |
91 |
| - ['', ''], |
92 |
| - ], |
93 |
| - 'default' => '', |
94 |
| - ], |
95 |
| - ]; |
96 |
| -} |
| 69 | +$GLOBALS['SiteConfiguration']['site']['columns']['fallbackDetectionLanguage'] = [ |
| 70 | + 'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:fallback.detection.language', |
| 71 | + 'config' => [ |
| 72 | + 'type' => 'select', |
| 73 | + 'renderType' => 'selectSingle', |
| 74 | + 'itemsProcFunc' => TcaLanguageSelection::class . '->get', |
| 75 | + ], |
| 76 | +]; |
97 | 77 |
|
98 | 78 | $GLOBALS['SiteConfiguration']['site']['columns']['allowAllPaths'] = [
|
99 | 79 | 'label' => 'LLL:EXT:language_detection/Resources/Private/Language/locallang.xlf:allow.all.paths',
|
|
0 commit comments