Skip to content

Commit 0a8c6b4

Browse files
committed
[TASK] Use of siteLanguage(“locale”) corrected
Releases: main, 13.4, 12.4
1 parent ee93b0f commit 0a8c6b4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Documentation/Conditions/Index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,13 @@ siteLanguage()
12751275
Returns the language ID as an integer.
12761276

12771277
:typoscript:`siteLanguage("locale")`
1278-
Returns the current locale as a string, for example `en-GB` or `de-DE`.
1278+
Returns the current locale as `\TYPO3\CMS\Core\Localization\Locale`.
1279+
You can call all public methods of the object, for example
1280+
:typoscript:`siteLanguage("locale").getName()` returns `en-GB` or `de-DE`.
1281+
1282+
**Note**: In version 12 there was an unintentional breaking change,
1283+
whereby an object and not a string is returned.
1284+
A future TYPO3 release may address implementing a shortcut for this.
12791285

12801286
:typoscript:`siteLanguage("base")`
12811287
Returns the configured base URL as a string.

0 commit comments

Comments
 (0)