[TYPO3-dev] Converting ll-xml files to xliff

Xavier Perseguers xavier at typo3.org
Sat Nov 26 14:57:30 CET 2011


Hi Žiga,

> I have an issue when I try to change some translations. My old
> translations, which are still picked up by typo3 when generating
> frontend, are stored in typo3conf/l10n/*sl*. However, if I open ll-xml
> module in BE and try translating files to Slovene, two things happen:
> 
> a) current translations are not pulled-in (meaning I get empty forms,
> untranslated), and
> b) if I translate some strings and save them, they are stored in new
> files under typo3conf/l10n/*si* folder.
> 
> I would thus like to "transfer" old translations into new ones. How may
> I best achieve that?

Transliterate files by:

1) Copying typo3conf/l10n/sl/*/*/sl.*.xml to typo3conf/l10n/si/*/*/si.*.xml
2) Edit files and replace <languageKey index="sl" by <languageKey index="si"

That's all.

This should do the trick:

------------------------------
$ cd /path/to/typo3conf/l10n/sl
$ for f in $(find . -type f -name \*.xml); do \
	NEW_FILE=$(echo $f | sed 's/\/sl/\/si/')
	mkdir -p ../si/$(dirname $f)
	cp $f ../si/$NEW_FILE
	sed -i "" 's/<languageKey index="sl"/<languageKey index="si"/'
../si/$NEW_FILE
done
------------------------------

HTH

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

TYPO3 .... inspiring people to share!
Get involved: http://typo3.org




More information about the TYPO3-dev mailing list