diff --git a/Documentation/Appendix/Cgl.rst b/Documentation/Appendix/Cgl.rst index f6ca8a9..9394c1f 100644 --- a/Documentation/Appendix/Cgl.rst +++ b/Documentation/Appendix/Cgl.rst @@ -103,3 +103,32 @@ label reference can be separated by dots, for example: Existing labels should not be mass-changed to snake case, as each changed label must be retranslated into all languages. + +.. _appendix-cgl-xliff-domain-syntax: + +Utilizing "translation domain syntax" +------------------------------------- + +With `Feature: #93334 - Translation Domain Mapping `_ +and `Feature: #107759 - TranslateViewHelper supports translation domain syntax `_ +the label localization within Fluid template files and PHP code can be +shortened: + +.. code-block:: html + + + + +.. code-block:: php + + $languageService->sL('backend.toolbar:save'); + +This syntax is preferred and should be utilized for any new code committed +to TYPO3 v14+ because of these reasons: + +* It is shorter, easier to read, has no odd `LLL:EXT:` magic notation +* Applies conventions of Symfony translation usage in other frameworks +* Allows better automatic extraction and analysis (CLI commands) +* Allows for better deprecations and usage analysis + +Detailed reasons are found in the mentioned changelogs.