Skip to content

Commit 9eb13eb

Browse files
brosuagarvinhicking
authored andcommitted
[DOCS] Properly use siteLanguage(“locale”) expression as object
The examples in the documentation now show that you have to work with the locale object. Resolves: #106317 Resolves: #106901 Releases: main, 13.4, 12.4 Change-Id: Ie2894189096525593ac7424e01b82569439883d3 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/90080 Tested-by: Torben Hansen <derhansen@gmail.com> Reviewed-by: Garvin Hicking <garvin@hick.ing> Tested-by: core-ci <typo3@b13.com> Tested-by: Garvin Hicking <garvin@hick.ing> Reviewed-by: Torben Hansen <derhansen@gmail.com>
1 parent e8419a2 commit 9eb13eb

File tree

1 file changed

+5
-5
lines changed
  • typo3/sysext/form/Documentation/I/Concepts/Variants

1 file changed

+5
-5
lines changed

typo3/sysext/form/Documentation/I/Concepts/Variants/Index.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ The most needed ones are for sure:
248248

249249
For example:
250250

251-
:yaml:`siteLanguage("locale") == "de_DE"`.
251+
:yaml:`siteLanguage("locale").getName() == "de-DE"`.
252252

253253

254254
``applicationContext`` (string)
@@ -327,7 +327,7 @@ the frontend language.
327327
variants:
328328
-
329329
identifier: language-variant-1
330-
condition: 'siteLanguage("locale") == "en_US.UTF-8"'
330+
condition: 'siteLanguage("locale").getName() == "en-US"'
331331
label: Contact form
332332
renderingOptions:
333333
submitButtonLabel: Submit
@@ -342,7 +342,7 @@ the frontend language.
342342
variants:
343343
-
344344
identifier: language-variant-1
345-
condition: 'siteLanguage("locale") == "en_US.UTF-8"'
345+
condition: 'siteLanguage("locale").getName() == "en-US"'
346346
label: Contact data
347347
renderingOptions:
348348
previousButtonLabel: Previous step
@@ -358,7 +358,7 @@ the frontend language.
358358
variants:
359359
-
360360
identifier: language-variant-1
361-
condition: 'siteLanguage("locale") == "en_US.UTF-8"'
361+
condition: 'siteLanguage("locale").getName() == "en-US"'
362362
label: Full name
363363
properties:
364364
fluidAdditionalAttributes:
@@ -619,7 +619,7 @@ In this example a select option is removed for a specific locale.
619619
variants:
620620
-
621621
identifier: salutation-variant
622-
condition: 'siteLanguage("locale") == "zh_CN.utf-8"'
622+
condition: 'siteLanguage("locale").getName() == "zh-CN"'
623623
properties:
624624
options:
625625
miss: __UNSET

0 commit comments

Comments
 (0)