[TYPO3-english] Locallang.xlf doesn't work for english

Nicolai Schirawski ns at t3magic.de
Tue Feb 9 12:57:45 CET 2016


Hi List,

I have a website with two languages:
- uid=0: german, default
- uid=1: english.

In setup.txt, I have set for German default:
config {
	language = de
	locale_all = de_DE	
	htmlTag_langKey = de
	metaCharset = utf-8
	sys_language_uid = 0	
	linkVars = L
	uniqueLinkVars = 1
	sys_language_overlay = 1
}	
and for english:

[globalVar = GP:L = 1]
   config.sys_language_uid = 1
   config.language = en
   config.locale_all = en_UK.UTF8
   config.htmlTag_langKey = en
[global]

This works fine and I can translate pages and content like expected.

Now I add an extbase extension.
In Resources/Private/Languages, I added two files:
- locallang.xlf:
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0">
	<file source-language="en" datatype="plaintext" >
		<header/>
		<body>
			<trans-unit id="eventListFrom">
				<source>Version EN</source>
			</trans-unit>
		</body>
	</file>
</xliff>

- and de.locallang.xlf with the german translation:
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.0">
	<file source-language="en" target-language="de" datatype="plaintext">
		<header/>
		<body>
			<trans-unit id="eventListFrom">
				<source>Version EN</source>
				<target>Version DE</target>
			</trans-unit>
			
		</body>
	</file>
</xliff>

In the fluid-template I use:
<f:translate key="eventListFrom" />

When switching languages, the result is always: "Version DE"

I tried:
- clear caches
- put German into locallang.xlf and add English as en.locallang.xlf
- made sure, the content-element is translated
but same result.

Any idea what else I could try?

Thanks for hints
Nicolai




More information about the TYPO3-english mailing list