Search code examples
typo3multilingualfluidtypo3-6.2.x

Typo3 Multilingual


I want to do a Multilingual Version of my Extension. In case of this I completed the Resources/Private/Language/locallang.xlf

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<xliff version="1.0">
<file source-language="de" datatype="plaintext" original="messages" date="2014-12-16T23:29:45Z" product-name="rere" target-language="en">
    <header/>
    <body>
        <trans-unit id="tx_rere_domain_model_note">
            <source>Note</source>
            <target>Note</target>
        </trans-unit>
        <trans-unit id="tx_rere_domain_model_note.notenr">
            <source>Notenr</source>
            <target>Notenr</target>
        </trans-unit>

It's a valid xml file.

Then I added in the html files this:

<f:translate key='tx_rere_domain_model_note'/>

But in the view there isn't shown anything ... als is blank

what's going wrong?


Solution

  • To switch to other languages you need to include a Navigation that lets you do just that. Language Menus are just a special type of navigation in Typo3.

    Look up, what uids your languages are assignes to in the sys_language table - usually 0 is the default, and every language you add gets an entry with a uid incremented by one - so, given 0: english, 1: german, the most basic configuration would look like this:

    lib.languages = HMENU
    lib.languages {
      special = language
      special.value = 0,1
    }
    

    It's explained more thoroughly in the reference:

    http://docs.typo3.org/typo3cms/TyposcriptReference/ContentObjects/Hmenu/Index.html#hmenu-special-property