Skip to content

Commit 2a62c14

Browse files
[TASK] Language checks
Releases: main
1 parent 2f693d6 commit 2a62c14

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

Documentation/Global/Translate.rst

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ Translate ViewHelper `<f:translate>`
2424
.. versionadded:: 14.0
2525
The translate ViewHelper supports `translation domains <https://docs.typo3.org/permalink/t3coreapi:label-reference>`_,
2626
a short and convenient way to reference language labels without
27-
requiring `LLL:` paths or explicit extension names.
27+
requiring `LLL:` paths or extension names.
2828

29-
The translation domain syntax is the **preferred** and **future-proof** way
29+
Translation domain syntax is the **recommended** and **future-proof** way
3030
to reference translations.
3131

32-
The traditional `LLL:` and `extension` arguments remain available for
32+
The older `LLL:` and `extension` arguments are still valid for
3333
**backward compatibility**.
3434

35-
All existing syntax forms remain fully supported, ensuring backward
35+
All existing syntax remains fully supported, ensuring backward
3636
compatibility. The new syntax can be adopted incrementally within a
3737
project, and both old and new forms can coexist in the same template.
3838

@@ -42,58 +42,58 @@ Translate ViewHelper `<f:translate>`
4242
Using translation domains
4343
=========================
4444

45-
The translation domain syntax is the **recommended** and preferred way to
46-
reference labels. It allows concise and clear label identifiers without
47-
`LLL:` paths or extension names.
45+
The translation domain syntax is the **recommended** way to
46+
reference labels. It allows concise and clear label identifiers, without using
47+
`LLL:` paths and extension names.
4848

4949
There are two equivalent ways to use domains:
5050

51-
1. **Provide the domain separately** and reference only the identifier
51+
1. **Provide the domain as a separate argument** and only reference the identifier
5252
(recommended):
5353

5454
.. code-block:: html
5555

5656
<f:translate domain="backend.toolbar" key="save" />
5757
<f:translate domain="my_extension.messages" id="greeting.hello" />
5858

59-
2. **Use the combined domain + identifier syntax** directly in `key`/`id`:
59+
2. **Use the combined domain + identifier syntax** in the `key`/`id` arguments:
6060

6161
.. code-block:: html
6262

6363
<f:translate key="backend.toolbar:save" />
6464
<f:translate id="my_extension.messages:greeting.hello" />
6565

66-
* The **domain** syntax is the preferred way for all new templates.
67-
* If both `domain` and `extension` are set, property **domain takes precedence**.
68-
* Traditional `key="LLL:EXT:..."` or `extension` arguments are still supported for
66+
* The **domain** syntax is the preferred syntax for all new templates.
67+
* If both `domain` and `extension` are set, **the domain property takes precedence**.
68+
* The older `key="LLL:EXT:..."` and `extension` arguments are still supported for
6969
backward compatibility.
7070

7171
.. tip::
72-
You can list all available translation domains and their corresponding
73-
language file mappings by running the console command:
72+
Run the console command to list all translation domains and their language
73+
file mapping:
7474

7575
.. code-block:: bash
7676
7777
vendor/bin/typo3 language:domain:list
7878
79-
This helps identify existing domains when migrating from `LLL:` paths
79+
This will help you find your domains when migrating from `LLL:` paths
8080
to the new translation domain syntax.
8181

8282
.. _typo3-fluid-translate-example-backward:
8383

8484
Backward compatible syntax
8585
==========================
8686

87-
The following forms remain supported for older templates and extensions.
88-
New code should use translation domains instead.
87+
The following forms are still supported for older templates and extensions.
88+
New code should use domains instead.
8989

9090
.. _typo3-fluid-translate-example-key-only:
9191

9292
Short key - Usage in Extbase
9393
----------------------------
9494

9595
The :ref:`key <t3viewhelper:viewhelper-argument-typo3-cms-fluid-viewhelpers-translateviewhelper-key>`
96-
argument alone works only within the Extbase context.
96+
argument on its own works in the Extbase context.
9797

9898
.. tabs::
9999

@@ -109,33 +109,33 @@ argument alone works only within the Extbase context.
109109
:language: xml
110110
:caption: packages/my_extension/Resources/Private/Language/locallang.xlf
111111

112-
Alternatively, you can use `id` instead of `key`, producing the same output.
112+
Alternatively, you can use `id` instead of `key` to produce the same output.
113113
If both `id` and `key` are set, `id` takes precedence.
114114

115115
If the translate ViewHelper is used with only the language key, the template
116-
**must** be rendered within an Extbase request, usually from an Extbase
116+
**must** be rendered in an Extbase request, usually from an Extbase
117117
controller action. The default language file must be located in the same
118-
extension as the Extbase controller and must be saved in the file
118+
extension as the Extbase controller and must be saved in
119119
:file:`Resources/Private/Language/locallang.xlf`.
120120

121121
.. _typo3-fluid-translate-example-key-extension:
122122

123123
Short key and extension name
124124
----------------------------
125125

126-
When the ViewHelper is called from outside Extbase, it is mandatory to either
127-
pass the extension name or use the full `LLL:` reference for the key.
126+
If the ViewHelper is called from outside Extbase, the extension name or the
127+
full `LLL:` key reference must be passed as arguments.
128128

129129
.. code-block:: html
130130

131131
<f:translate key="domain_model.title" extension="my_extension" />
132132

133-
The default language file must be saved in the extension specified in the
134-
argument, in the file :file:`Resources/Private/Language/locallang.xlf`.
133+
The default language file must be located in
134+
:file:`Resources/Private/Language/locallang.xlf` of the extension.
135135

136136
.. versionchanged:: 14.0
137-
The translation domain syntax replaces this form as the preferred way
138-
to reference labels. The `extension` argument continues to work for
137+
The translation domain syntax is now the recommended way
138+
to reference labels. The `extension` argument still works for
139139
backward compatibility.
140140

141141
.. _typo3-fluid-translate-example-key-full:
@@ -154,7 +154,7 @@ file can be used.
154154

155155
.. note::
156156
This legacy form remains fully supported for backward compatibility.
157-
The domain syntax should be used for all new templates.
157+
Domain syntax should be used for all new templates.
158158
.. _typo3-fluid-translate-example-html:
159159

160160
Keeping HTML tags within translations
@@ -237,7 +237,7 @@ which allows for more flexible and readable formatting.
237237
Inline notation with arguments and default value
238238
================================================
239239

240-
Like all other ViewHelpers, the translate ViewHelper can be used with the
240+
Like all the other ViewHelpers, the translate ViewHelper can be used with
241241
`Inline syntax <https://docs.typo3.org/permalink/fluid:viewhelper-inline-notation>`_.
242242

243243
.. code-block:: html

0 commit comments

Comments
 (0)