Issue Bug Closed

#33227Regression in language handling introduced by locallangXmlOverride fix

Susanne Moog 01/16/12, 19:18 updated 02/07/12, 08:20

Description

Since the fix for #32573 there is a regression in the language handling of TYPO3. If you request a translated string in a language where no translation is available you used to get the default language labels in the [target] array attribute of the LOCAL_LANG array for that language. After the fix you only get the [source] element filled. Which seems logically more correct but breaks extensions (like extbase/fluid) that rely on always having the [target] attribute filled.

Example:
locallang.xml with

        <languageKey index="default" type="array">
            <label index="label1">This is label #1</label>
            <label index="label2">This is label #2</label>
            <label index="label3">This is label #3</label>
        </languageKey>

request language (config.language) = de

expected result (before the fix of #32573):

array(
  0 => array(
    'source' => 'This is label #1',
    'target' => 'This is label #2'
  )
)

current result (after #32573):

array(
  0 => array(
    'source' => 'This is label #1'
  )
)

Reviews 2