Project

General

Profile

Actions

Bug #47996

closed

Issue with locallangXMLOverride and XML-localization files

Added by Lars no-lastname-given almost 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2013-05-06
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

Description

If you use the locallangXMLOverride mechanism with xml-localization files, locallangXMLOverride fails with the fallback to default language if the needed language is not available.

Example:

original_translations.xml:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<T3locallang>
  <meta type="array">
    <type>database</type>
  </meta>
  <data type="array">
    <languageKey index="default" type="array">
      <label index="label1">English</label>
    </languageKey>

    <languageKey index="de" type="array">
      <label index="label1">German</label>
    </languageKey>
   </data>
 </T3locallang>

override_translations.xml (no default-tree available!!!):

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<T3locallang>
  <meta type="array">
    <type>database</type>
  </meta>
  <data type="array">
    <languageKey index="de" type="array">
      <label index="label1">German OVERRIDE</label>
    </languageKey>
   </data>
 </T3locallang>

Inside any localconf-file you register the override_translations.xml:

$TYPO3_CONF_VARS['SYS']['locallangXMLOverride']['fileadmin/original_translations'][] = 'fileadmin/override_translations.xml';

To test the output i use TS:

page.10 = TEXT
page.10.data = LLL:fileadmin/original_translations:label1

Output with L=0 (config.language = en):

German OVERRIDE

Output with L=1 (config.language = de):

German OVERRIDE

The problem is the parsing-process of the locallangXMLOverride-file in class t3lib_l10n_parser_Llxml.

Tested with TYPO3 4.7.11


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #56148: locallangXMLOverride for not existing translationsClosed2014-02-20

Actions
Actions

Also available in: Atom PDF