|
1 | | -.. include:: /Includes.rst.txt |
| 1 | +.. include:: /Includes.rst.txt |
2 | 2 |
|
| 3 | +.. _localized-content: |
3 | 4 |
|
4 | | -.. _localized-content: |
5 | | - |
| 5 | +================= |
6 | 6 | Localized content |
7 | | ------------------ |
8 | | - |
9 | | -There are two strategies for handling the translation of content on pages: |
10 | | - |
11 | | -- **Connected mode:** Translating content will create a direct connection between the original |
12 | | - language and the language you translate to. This means that moving an |
13 | | - element or setting meta information like start- or endtime will be taken |
14 | | - from the original content and you will not be able to set these values |
15 | | - on a translated content element. Translated records will hold the |
16 | | - connection to their original language record in the "l10n_parent" field. |
17 | | - This mode is best for a strict translation workflow. |
18 | | - |
19 | | -- **Free mode:** Copying content will take the content elements from the source language |
20 | | - and create copies in a different language. This means that you will be able |
21 | | - to move content elements around freely, but you will not have the benefit of |
22 | | - being able to compare changes made in the source language later on. |
23 | | - Use this mode, when the translated pages content can largely differ from |
24 | | - the original language and you want to have that freedom in designing your |
25 | | - translated website. |
| 7 | +================= |
26 | 8 |
|
27 | | -When you start translating a page, the **WEB > Page** module will |
28 | | -ask you about this choice. |
| 9 | +.. contents:: |
| 10 | + :local: |
29 | 11 |
|
30 | | -.. figure:: /Images/ManualScreenshots/PageModule/LocalizedContentTranslationWizard.png |
31 | | - :alt: The translation wizard showing localization strategies |
32 | 12 |
|
33 | | - The translation wizard asks for a choice of localization strategy |
| 13 | +Introduction |
| 14 | +============ |
34 | 15 |
|
| 16 | +There are two strategies for handling the translation of content on pages: |
35 | 17 |
|
36 | | -The "Translate" button corresponds to the connected mode, the "Copy" |
37 | | -button to the free mode. Furthers details on how to proceed with |
| 18 | +Connected mode |
| 19 | + Translating content will create a direct connection between the original |
| 20 | + language and the language you translate to. This means that moving an |
| 21 | + element or setting meta information like start time or end time will be |
| 22 | + taken from the original content and you will not be able to set these values |
| 23 | + on a translated content element. Translated records will hold the connection |
| 24 | + to their original language record in the :sql:`l10n_parent` field. |
| 25 | + This mode is best for a strict translation workflow. |
| 26 | + |
| 27 | +Free mode |
| 28 | + Copying content will take the content elements from the source language |
| 29 | + and create copies in a different language. This means that you will be able |
| 30 | + to move content elements around freely, but you will not have the benefit of |
| 31 | + being able to compare changes made in the source language later on. |
| 32 | + Use this mode, when the translated pages content can largely differ from |
| 33 | + the original language and you want to have that freedom in designing your |
| 34 | + translated website. |
| 35 | + |
| 36 | +When you start translating a page, the :guilabel:`Web > Page` module will ask |
| 37 | +you about this choice when clicking on the :guilabel:`Translate` button: |
| 38 | + |
| 39 | +.. figure:: /Images/ManualScreenshots/PageModule/LocalizedContentTranslationWizard.png |
| 40 | + :alt: The translation wizard showing localization strategies |
| 41 | + :class: with-shadow |
| 42 | + |
| 43 | + The translation wizard asks for a choice of localization strategy |
| 44 | + |
| 45 | +The :guilabel:`Translate` button corresponds to the connected mode, the |
| 46 | +:guilabel:`Copy` button to the free mode. Furthers details on how to proceed with |
38 | 47 | translations are found in the :ref:`Editor's Tutorial <t3editors:languages>`. |
39 | 48 |
|
40 | 49 |
|
41 | | -.. _localized-connected-content: |
| 50 | +.. _localized-connected-content: |
42 | 51 |
|
43 | 52 | Connected content |
44 | | -""""""""""""""""" |
| 53 | +================= |
45 | 54 |
|
46 | 55 | If you opted for the connected content strategy, this is the default way |
47 | 56 | that translated pages will be handled in the frontend and requires |
48 | | -no further configuration in the site config. |
49 | | -In the site config, the fallbackType "strict" would look like this: |
| 57 | +no further configuration in the :ref:`site configuration <t3coreapi:sitehandling>`. |
| 58 | +In the site configuration, the fallbackType "strict" would look like this: |
50 | 59 |
|
51 | | -.. code-block:: yaml |
52 | | - :caption: config/sites/my_site/config.yaml |
| 60 | +.. code-block:: yaml |
| 61 | + :caption: config/sites/my_site/config.yaml |
53 | 62 |
|
54 | | - languages: |
55 | | - - |
56 | | - # ... other language settings ... |
57 | | - fallbackType: strict |
| 63 | + languages: |
| 64 | + - |
| 65 | + # ... other language settings ... |
| 66 | + fallbackType: strict |
58 | 67 |
|
59 | 68 | In this connected mode, TYPO3 will first internally fetch the records of the |
60 | 69 | default language, then overlay them with the target language. If a record is |
61 | | -not translated into the target language, then it is discarded and not shown at all. |
| 70 | +not translated into the target language, then it is discarded and not shown at |
| 71 | +all. |
62 | 72 |
|
63 | 73 | The German version will be reduced to the actually translated elements: |
64 | 74 |
|
65 | | -.. figure:: /Images/ManualScreenshots/Frontend/LocalizedContentNoOverlay.png |
66 | | - :alt: English and German translation without overlays |
67 | | - :class: with-border with-shadow |
68 | | - |
| 75 | +.. figure:: /Images/ManualScreenshots/Frontend/LocalizedContentNoOverlay.png |
| 76 | + :alt: English and German translation without overlays |
| 77 | + :class: with-shadow |
69 | 78 |
|
| 79 | + English and German translation without overlays |
70 | 80 |
|
71 | | -Another way to view "connected" content in the frontend is by creating a fallback |
72 | | -chain. For this we have to adjust the site configuration and provide a comma separated |
73 | | -list of fallback languages: |
| 81 | +Another way to view connected content in the frontend is by creating a fallback |
| 82 | +chain. For this we have to adjust the site configuration and provide a |
| 83 | +comma-separated list of fallback languages: |
74 | 84 |
|
75 | | -.. code-block:: yaml |
76 | | - :caption: config/sites/my_site/config.yaml |
| 85 | +.. code-block:: yaml |
| 86 | + :caption: config/sites/my_site/config.yaml |
77 | 87 |
|
78 | | - languages: |
79 | | - - |
80 | | - # ... other language settings ... |
81 | | - fallbackType: fallback |
82 | | - # 1 = Danish, 0 = English |
83 | | - fallbacks: '1,0' |
| 88 | + languages: |
| 89 | + - |
| 90 | + # ... other language settings ... |
| 91 | + fallbackType: fallback |
| 92 | + # 1 = Danish, 0 = English |
| 93 | + fallbacks: '1,0' |
84 | 94 |
|
85 | 95 | In this mode, TYPO3 will also first internally fetch the records of the |
86 | 96 | default language and then overlay them with the target language. If no translation |
87 | 97 | exists for the target language, it will now go from left to right through the |
88 | | -fallback chain and first try to find a translation for the languageId 1 (Danish) and |
89 | | -if that is a miss as well, fall back to languageId 0 (English). |
90 | | - |
91 | | -.. figure:: /Images/ManualScreenshots/Frontend/LocalizedContentTranslationOverlay.png |
92 | | - :alt: English and German translation with overlays |
93 | | - :class: with-border with-shadow |
| 98 | +fallback chain and first try to find a translation for the language ID 1 (Danish) |
| 99 | +and, if that is a miss as well, fall back to language ID 0 (English). |
94 | 100 |
|
95 | | - The English version and its German translation, with overlays |
| 101 | +.. figure:: /Images/ManualScreenshots/Frontend/LocalizedContentTranslationOverlay.png |
| 102 | + :alt: English and German translation with overlays |
| 103 | + :class: with-shadow |
96 | 104 |
|
97 | | -.. warning:: |
| 105 | + The English version and its German translation, with overlays |
98 | 106 |
|
99 | | - If you want to use the "connected content" paradigm in conjunction with the |
100 | | - :ref:`"Hide default translation of the page" <localization-overview-hide-default-language>` |
101 | | - setting, you will need to provide placeholder content elements |
102 | | - in the default language and translate them, since the whole frontend |
103 | | - rendering process starts from the default language in such a configuration. |
| 107 | +.. warning:: |
| 108 | + If you want to use the "connected content" paradigm in conjunction with the |
| 109 | + :ref:`"Hide default translation of the page" <localization-overview-hide-default-language>` |
| 110 | + setting, you will need to provide placeholder content elements |
| 111 | + in the default language and translate them, since the whole frontend |
| 112 | + rendering process starts from the default language in such a configuration. |
104 | 113 |
|
105 | | -.. _localized-content-free-content: |
| 114 | +.. _localized-content-free-content: |
106 | 115 |
|
107 | 116 | Free content |
108 | | -"""""""""""" |
| 117 | +============ |
109 | 118 |
|
110 | | -With the free mode content strategy, the site config will have to be |
| 119 | +With the free mode content strategy, the |
| 120 | +:ref:`site configuration <t3coreapi:sitehandling>` will have to be |
111 | 121 | adjusted accordingly: |
112 | 122 |
|
113 | | -.. code-block:: yaml |
114 | | - :caption: config/sites/my_site/config.yaml |
| 123 | +.. code-block:: yaml |
| 124 | + :caption: config/sites/my_site/config.yaml |
115 | 125 |
|
116 | | - languages: |
117 | | - - |
118 | | - # ... other language settings ... |
119 | | - fallbackType: free |
| 126 | + languages: |
| 127 | + - |
| 128 | + # ... other language settings ... |
| 129 | + fallbackType: free |
120 | 130 |
|
121 | 131 | This means, TYPO3 will directly fetch the translated records and not care |
122 | 132 | about the records in the default language at all. |
123 | 133 |
|
124 | | -.. tip:: |
| 134 | +.. tip:: |
125 | 135 | For more information on how to add languages and configure their |
126 | | - behaviour in the site configuration, please see |
127 | | - :ref:`Adding Languages <sitehandling-addinglanguages>` |
| 136 | + behaviour in the site configuration, see |
| 137 | + :ref:`Adding Languages <sitehandling-addinglanguages>`. |
128 | 138 |
|
129 | 139 |
|
130 | | -.. _localized-content-all-language: |
| 140 | +.. _localized-content-all-language: |
131 | 141 |
|
132 | 142 | The "All" language |
133 | | -"""""""""""""""""" |
| 143 | +================== |
134 | 144 |
|
135 | 145 | When using overlays, it becomes possible to use a particular |
136 | 146 | language called "All", which will be automatically visible across all |
137 | 147 | translations. The uid of that particular language is "-1". |
138 | 148 |
|
139 | | -.. figure:: /Images/ManualScreenshots/Record/LocalizedContentAllLanguageDefined.png |
140 | | - :alt: Content element in "All" language |
| 149 | +.. figure:: /Images/ManualScreenshots/Record/LocalizedContentAllLanguageDefined.png |
| 150 | + :alt: Content element in "All" language |
| 151 | + :class: with-shadow |
141 | 152 |
|
142 | | - A content element valid for all languages |
| 153 | + A content element valid for all languages |
143 | 154 |
|
144 | | -It is also marked with the special language icon in the **WEB > Page** |
| 155 | +It is also marked with the special language icon in the :guilabel:`Web > Page` |
145 | 156 | module: |
146 | 157 |
|
147 | | -.. figure:: /Images/ManualScreenshots/PageModule/LocalizedContentAllLanguagePageModule.png |
148 | | - :alt: "All" language in the Page Module |
| 158 | +.. figure:: /Images/ManualScreenshots/PageModule/LocalizedContentAllLanguagePageModule.png |
| 159 | + :alt: "All" language in the Page Module |
| 160 | + :class: with-shadow |
149 | 161 |
|
150 | | - An "All" language content element displayed in the Web > Page |
| 162 | + An "All" language content element displayed in the :guilabel:`Web > Page` module |
151 | 163 |
|
152 | | -Note that no "Translate" button appears, the new content element |
| 164 | +Note that no :guilabel:`Translate` button appears, the new content element |
153 | 165 | is valid for all languages. |
154 | 166 |
|
155 | 167 |
|
156 | | -.. _localized-content-inline-elements: |
| 168 | +.. _localized-content-inline-elements: |
157 | 169 |
|
158 | 170 | Localizing inline elements (IRRE) |
159 | | -""""""""""""""""""""""""""""""""" |
| 171 | +================================= |
160 | 172 |
|
161 | | -When localizing a record with inline elements (aka. IRRE), the inline |
162 | | -elements will be grayed out and not automatically localized. TYPO3 |
| 173 | +When localizing a record with :ref:`inline elements (IRRE) <columns-inline>`, |
| 174 | +the inline elements will be grayed out and not automatically localized. TYPO3 |
163 | 175 | will display two buttons to help you localize and keep the elements in |
164 | 176 | sync. |
165 | 177 |
|
166 | | -.. figure:: ../Images/LocalizedContentLocalizingIrreElements.png |
167 | | - :alt: Buttons for localizing and synchronizing inline elements. |
| 178 | +.. figure:: ../Images/LocalizedContentLocalizingIrreElements.png |
| 179 | + :alt: Buttons for localizing and synchronizing inline elements |
| 180 | + :class: with-shadow |
| 181 | + |
| 182 | + Buttons for localizing and synchronizing inline elements |
| 183 | + |
| 184 | +**Localize all records (1)** creates localized versions of all inline |
| 185 | +elements from the default language in your current language so that |
| 186 | +you can translate them. Each element that has not yet been localized |
| 187 | +will also have a :guilabel:`Localize` button (3) that will allow you to localize |
| 188 | +individual elements. |
168 | 189 |
|
169 | | -* **Localize all records (1)** creates localized versions of all inline |
170 | | - elements from the default language in your current language so that |
171 | | - you can translate them. Each element that has not yet been localized |
172 | | - will also have a "Localize" button (3) that will allow you to localize |
173 | | - individual elements. |
174 | | -* **Synchronize with original language (2)** can be clicked when you have |
175 | | - translated the elements and the content in the default language changed. |
| 190 | +**Synchronize with original language (2)** can be clicked when you have |
| 191 | +translated the elements and the content in the default language changed. |
0 commit comments