Reputation: 5629
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?
Upvotes: 0
Views: 141
Reputation: 1201
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:
Upvotes: 1
Reputation: 1201
Remove the extension key. You don't need it as long as your view is inside the same extension. Try this:
<trans-unit id="note">
<source>Note</source>
<target>Note</target>
</trans-unit>
<f:translate key='note'/>
Upvotes: 1