Skip to content

studiomitte/csv2xlf

Repository files navigation

TYPO3 Extension csv2xlf

TYPO3 12

This extension provides a command to generate a XLF file and its translations from a CSV file.

The typical use case is to provide an online Excel/Google Docs for clients to provide translations which then are converted to XLF files.

Installation

composer require studiomitte/csv2xlf

Usage

CSV to XLF

CSV looks like this

"key","en","de"
"example","This is an example NEW","Das ist ein Beispiel","Ceci est un exemple"
"example2","<![CDATA[<h3>Datenschutzhinweis (bs)</h3>","Das ist ein Beispiel"

With the following requirements:

  • The first row is the header
  • The header starts with key, followed by en and afterward the language codes
  • Default is always en
./bin/typo3 csv2xlf:csv2xlf packages/csv2xlf/Resources/Private/Examples/csv2xlf/in.csv packages/csv2xlf/Resources/Private/Examples/csv2xlf/out.xlf

XLF to CSV

./bin/typo3 csv2xlf:xlf2csv packages/csv2xlf/Resources/Private/Examples/xlf2csv/in.xlf  packages/csv2xlf/Resources/Private/Examples/xlf2csv/out.csv de,fr,es

Credits

This extension was created by Studio Mitte with ♥.

Find more TYPO3 extensions we have developed that provide additional features for TYPO3 sites.