3
votes

I use this Typoscript code:

lib.search = FLUIDTEMPLATE
lib.search.file = {$partialsTemplatesPath}search.html

Whats the best way to use multilanguage inside this Fluidtemplate? Using lib.search.variables and GP:L conditions cant be the best way, right?

UPDATE: Template:

<f:translate key="LLL:{locallangPath}locallang.xlf:search" />

XLF File:

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="en" datatype="plaintext" original="messages" date="2013-10-21T12:50:51Z" product-name="content">
        <header/>
        <body>

            <trans-unit id="search">
                <source>Search</source>
            </trans-unit>

        </body>
    </file>
</xliff>

Translated XLF (de.locallang.xlf):

<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<xliff version="1.0">
    <file source-language="de" datatype="plaintext" original="messages" date="2013-10-21T12:50:51Z" product-name="content">
        <header/>
        <body>

            <trans-unit id="search">
                <target>Suche</target>
            </trans-unit>

        </body>
    </file>
</xliff>

This is the right way I guess. But the output is only "Search" and not "Suche". Did I miss something?

2
Did you end up solving this? Having a similar problem.newenglander
@newenglander: i used the method above. it seems it was a strange bug. a mix of cache problems and a bad plugin setup.ggzone

2 Answers

1
votes

For the translated one you have to specify source AND target language:

take a look at: http://docs.typo3.org/typo3cms/CoreApiReference/6.2/Internationalization/Introduction/Index.html

hope that works for you...

0
votes

You can use the translate viewhelper inside of your fluidtemplate.

See: https://fedext.net/viewhelpers/fluid/TranslateViewHelper.html