[Neos] Multi-language: Translate Label using Main.xlf

Chanthorn Ngeth chanthorn at web-essentials.asia
Wed May 29 12:04:33 CEST 2013


Hi Lists,

I want a website with multi-language are "de" and "en".
I have created multi tree "de" and "en" then change html lang key while 
switch the language.
It's work fine for me but I have one more problem is to translate label 
in Main.xlf file.

I have created two folders are "de" and "en" inside 
MyPackage/Resources/Private/Translations/ add add Main.xlf file there.

What it does now is all the label get from "en" folder. So could you 
give me some ideas to translate label when I switch language to "de"?

Here are the structure of my files:
MyPackage/Resources/Private/Translations/en/Main.xlf
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
	<file original="" source-language="en" datatype="plaintext">
		<body>
			<trans-unit id="label.breadcrumb">
				<source>My Breadcrumb.</source>
			</trans-unit>
		</body>
	</file>
</xliff>

MyPackage/Resources/Private/Translations/de/Main.xlf

<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
	<file original="" source-language="en" target-language="de" 
datatype="plaintext">
		<body>
			<trans-unit id="label.breadcrumb">
				<source>My Breadcrumb.</source>
				<target>Meine Breadcrumb.</target>
			</trans-unit>
		</body>
	</file>
</xliff>


Kind regards,
Chanthorn


More information about the Neos mailing list