Location of the locallang file
Some offical documentation does not refer to the locallang solution for Typo3 4.5 any more. In other word’s: It’s a little tricky nowadays to find out about how this works, but don’t panic, it’s simple: Locallang (the storage of translated terms for the module and the frontend) must be located at Resources/Private/Language/locallang.xml to be recognised by the extbase framework. This is simple, if you know it. 😉
Format of the locallang.xml
Secondly you have to concider the locallang.xml format to make things work. As long as the official documentation is available, you’ll be happy with it and it’s “Elements” link at the end of the page.
Be aware: In the moment you change from 4.5 to a higher version (4.6+), all this is void, because the localisation feature changes. If you want to work with 4.5 (LTS) as an intermediate step to a 4.6 or 6.2 version, you shouldn’t spend too much effort on the complete file structure of the locallang.xml, because it will be overwritten by the new framework very fast.
To define just as much as minimally necessary, your locallang.xml file should look like this:
<?xml version="1.0" encoding="UTF-8"?> <T3locallang> <meta type="array"> <type>module</type> <description>Language labels for the CS Events plugin</description> <labelContext type="array"/> </meta> <data type="array"> <languageKey index="default" type="array"> <label index="CsEvents.appointmentListEmpty">Sorry, currently no events are available.</label> </languageKey> <languageKey index="de" type="array"> <label index="CsEvents.appointmentListEmpty">Zur Zeit sind leider keine Termine verfügbar.</label> </languageKey> </data> </T3locallang>
As you can see, I define the <meta> and <data> elements only and I totally ignore the <orig_hash> and <orig_text> elements here. Those elements are used for distributed translations. You don’t need them, if you don’t want anybody to translate your’s extension’s quotations. I strongly recommend to not spend too much effort on this, but to proceed to Version 6.2 (LTS) as soon as possible. I’ll do that, thus I won’t add any content for additional translations here.