.. include:: /Includes.rst.txt .. _cb_definition_language: ======== Language ======== This is the folder for your translations. In fact, if you only have one language, there is no actual need to maintain translations here. However, it is best practice to separate labels and configuration. Labels.xlf ========== This XLF file is the **english** basis for your translations. All translations for backend labels as well as for frontend labels are defined here. Translations to other languages are defined in separate files prefixed with the language code e.g. **de.Labels.xlf**. * Learn more about the :ref:`XLIFF Format in TYPO3 ` Convention ---------- The translation keys follow a **convention** and are registered automatically. First of all, **title** and **description** are used in various areas for the Content Type. Field labels consist of the :yaml:`identifier` and **label** separated by a dot. Same goes for the optional **description**. :ref:`Collections ` introduce another nesting level. To translate their fields, the identifiers are simply separated by a dot. :ref:`Palettes ` and :ref:`Tabs ` have a special convention as well. It is also possible to translate the :yaml:`items` option of :ref:`Select `, :ref:`Radio ` and :ref:`Checkbox ` fields. Have a look at the example beneath for better understanding. .. tip:: You don't have to remember all these rules. The command :ref:`content-blocks:language:generate ` creates the Labels.xlf file with all available keys for you. .. note:: Labels defined in Labels.xlf will always override :yaml:`label` defined in EditorInterface.yaml. Workflow -------- The recommended workflow is defining the :yaml:`label` in the EditorInterface.yaml first. When you are done, you run the command to auto-generate the Labels.xlf file. After that you can remove the labels from the yaml definition. You can also skip the first step and generate the xlf without defining labels first. This will add the :yaml:`identifier` as label and you can adjust it afterwards. Either way, it is recommended to maintain a Labels.xlf file so you don't mix labels with configuration. .. code-block:: xml
This is the Content Type backend title This is the Content Type backend description This is the backend label for FIELD_IDENTIFIER This is the backend description for FIELD_IDENTIFIER This is the backend label for FIELD_IDENTIFIER in Collection COLLECTION_IDENTIFIER Label for Palette Description for Palette Label for Palette in Collection Label for Palette in nested Collection Label for Tab Label for Tab in Collection Label for Tab in nested Collection