Project

General

Profile

Actions

Bug #44626

closed

Numeric translation keys aren't translated right in XML files

Added by Reinhard Führicht over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
Start date:
2013-01-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.1
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When working with the "old" XML based translation files, numeric keys aren't translated properly.

Example:

<languageKey index="default" type="array">
    <label index="1">1</label>
    <label index="2">2</label>
    <label index="3">3</label>

    <label index="11">11</label>
    <label index="22">22</label>
    <label index="33">33</label>
</languageKey>

Output:

2
3
11

33

I investigated this issue and found out that "LocallangXmlParser" in typo3/sysext/core/Classes/Localization/Parser uses array_merge to combine the translation arrays of the default language and the current language.

Problem

array_merge renumbers numeric keys. Therefore, numeric key in translation files result in wrong translations in Frontend.

Actions

Also available in: Atom PDF