[TYPO3-english] FLUIDTEMPLATE f:translate and XLIFF

Victor Livakovsky v-tyok at mail.ru
Mon Apr 9 14:05:18 CEST 2012


Hi, list.

Once again I have a question about fluid.
Is it possible to use .xlf files in FLUIDTEMPLATE f:translate viewHelper?
If so, what filepath should I specify for multilanguage website?

I.e., I have two xlf files:
fileadmin/locallang.xlf
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="en" datatype="htmlbody" original="messages" 
date="2012-04-06T11:48:07Z" product-name="fluid" xml:space="preserve">
        <header/>
        <body>
            <trans-unit id="page.logo.title">
                <source>Home (orig)</source>
            </trans-unit>
        </body>
    </file>
</xliff>

fileadmin/de.locallang.xlf
<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="en" target-language="de" datatype="htmlbody" 
original="messages" date="2012-04-06T11:48:07Z" product-name="fluid" 
xml:space="preserve">
        <header/>
        <body>
            <trans-unit id="page.logo.title" approved="yes">
                <source>Home (en)</source>
                <target>Home (de)</target>
            </trans-unit>
        </body>
    </file>
</xliff>

If I specify original file in a path like this:
{f:translate(key: 'LLL:fileadmin/locallang.xlf:page.logo.title', default: 
'Home')}
Then FE output is same for both languages: Home (orig)

If I specify a path like this:
{f:translate(key: 'LLL:fileadmin/de.locallang.xlf:page.logo.title', default: 
'Home')}
Then FE output is always: Home (en)

German label is never fetched. Am I doing something wrong? 



More information about the TYPO3-english mailing list