如何覆盖页面属性中的后端/制表符标签?

How to overwrite backend / tabulator labels in page properties?

我在页面属性(类别下方)中添加了新的输入字段:

TCA/Overrides/pages.php

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
    'pages',
    '--palette--;My palette label;eventdetails',
    '1', // List of specific types to add the field list to. (If empty, all type entries are affected)
    'after:categories' // Insert fields before (default) or after one, or replace a field
);

// Add the new palette:
$GLOBALS['TCA']['pages']['palettes']['eventdetails'] = array(
    'showitem' => 'event_location,event_organizer,event_additional_info'
);

来自 LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_category.tabs.category 的制表符标签 "Category" 现在不再适用(我更喜欢 "Event properties")。是否可以以某种方式覆盖 sys_category.tabs.category

更新:

对不起,我误会了。 您可以用自己的 xlf 文件覆盖后端标签。

ext_localconf.php

$GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:core/Resources/Private/Language/locallang_tca.xlf'][] = 'EXT:your_extension/Resources/Private/Language/yourtranslationfile.xlf';

Resources/Private/Language/yourtranslationfile.xlf

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
  <xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2019-11-11T17:23:27Z" product-name="your_extension">
      <header/>
        <body>
          <trans-unit id="sys_category.tabs.category">
            <source>Event properties</source>
          </trans-unit>
        </body>
    </file>
</xliff>

请参阅 TYPO3 doc

中的翻译处理

原回答(在页面属性中添加自定义标签):

你可以只添加“--div--;你的标签标签”。

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes(
  'pages',
  '--div--; My new tab, --palette--;My palette label;eventdetails',
  '1',
  'after:categories'
);

您不需要(最好不要)覆盖类别选项卡。实际上,如果其中没有字段,则不会显示此选项卡(通过访问管理限制对类别的访问)。