[TYPO3-mvc] XLIFF multilang
Kay Strobach
typo3 at kay-strobach.de
Sun Mar 3 21:51:29 CET 2013
Hello guys,
i do have an locallang.xml file, which looks like this:
> <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
> <T3locallang>
> <meta type="array">
> <type>module</type>
> <description>Language labels for Extension Builder BE Module</description>
> </meta>
> <data type="array">
> <languageKey index="default" type="array">
> <label index="mlang_tabs_tab">Themes Builder</label>
> <label index="mlang_labels_tabdescr">Create Themes</label>
> </languageKey>
> <languageKey index="de" type="array">
> <label index="mlang_tabs_tab">Themes Builder</label>
> <label index="mlang_labels_tabdescr">Dieses Modul erlaubt das erstellen eines Gerüsts für einen Ext:themes Theme.</label>
> </languageKey>
> </data>
> </T3locallang>
This file contains 2 languages (en / de).
To achieve the same followed the article on:
http://www.felixnagel.com/blog/artikel/2012/11/09/how-to-use-xlf-files-in-typo3-extbase-extensions/
so i created 2 xlf files in my Language folder.
This way i have the following files:
1. en: locallang.xlf
> <?xml version="1.0" encoding="UTF-8"?>
> <xliff version="1.0">
> <file source-language="en" datatype="plaintext" original="messages" date="2011-10-17T20:22:33Z" product-name="themes_builder">
> <header/>
> <body>
> <trans-unit id="mlang_tabs_tab" xml:space="preserve">
> <source>Themes Builder</source>
> </trans-unit>
> <trans-unit id="mlang_labels_tabdescr" xml:space="preserve">
> <source>Create Themes</source>
> </trans-unit>
> </body>
> </file>
> </xliff>
2. de: de.locallang.xlf
> <?xml version="1.0" encoding="UTF-8"?>
> <xliff version="1.0">
> <file source-language="en" target-language="de" datatype="plaintext" original="messages" date="2012-06-05T10:52:05Z" product-name="themes_builder">
> <header/>
> <body>
> <trans-unit id="mlang_tabs_tab" xml:space="preserve">
> <source>XLF ... Themes Builder</source>
> </trans-unit>
> <trans-unit id="mlang_labels_tabdescr" xml:space="preserve">
> <source>Dieses Modul erlaubt das erstellen eines Gerüsts für einen Ext:themes Theme.</source>
> </trans-unit>
> </body>
> </file>
> </xliff>
So how do i achieve, that the language is displayed according to the
setting in the user preferences. I first thought, that i can put both
file nodes into the first file. Sadly i have no idea how to achieve that :(
Any Idea?
PS: Is there any backported functionality, which allows me to use xliff
in 4.5 LTS?
Thanks in advice
Kay
--
http://www.kay-strobach.de - Open Source Rocks
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
Answer was useful - feel free to donate:
-
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KPM9NAV73VDF2
- https://flattr.com/profile/kaystrobach
More information about the TYPO3-project-typo3v4mvc
mailing list