Skip to content

Instantly share code, notes, and snippets.

@Megafry
Created October 26, 2021 13:47
Show Gist options
  • Save Megafry/8da833eb5ebd1e0b3be3dfa1554043af to your computer and use it in GitHub Desktop.
Save Megafry/8da833eb5ebd1e0b3be3dfa1554043af to your computer and use it in GitHub Desktop.
Regex xml to xlf (TYPO3)
## Default (locallang.xml to locallang.xlf)
## search
<label index="(.*?)">(.*?)</label>
## replace
<trans-unit id="$1">\n\t<source>$2</source>\n</trans-unit>
## langauge (locallang.xml to de.locallang.xlf)
## search
<label index="(.*?)">(.*?)</label>
## replace
<trans-unit id="$1">\n\t<target>$2</target>\n</trans-unit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment