diff --git a/classes/UpgradeTools/Translator.php b/classes/UpgradeTools/Translator.php index c2ab34545..71a3ed9ca 100644 --- a/classes/UpgradeTools/Translator.php +++ b/classes/UpgradeTools/Translator.php @@ -44,8 +44,10 @@ private function loadTranslations() private function loadXlfFile($filePath) { $xml = new SimpleXMLElement(file_get_contents($filePath)); - foreach ($xml->file->body->{'trans-unit'} as $unit) { - $this->translations[(string) $unit->source] = (string) $unit->target; + foreach ($xml->file as $file) { + foreach ($file->body->{'trans-unit'} as $unit) { + $this->translations[(string) $unit->source] = (string) $unit->target; + } } }