diff --git a/convert.php b/convert.php index 185a571..745151b 100755 --- a/convert.php +++ b/convert.php @@ -239,6 +239,12 @@ $fileSeq = 0; for ($i = 1; $i <= $maxFiles; $i++) { + + if (empty($article['fileLocale'.$i])) { + $fileLocale = $articleLocale; + } else { + $fileLocale = $locales[trim($article['fileLocale'.$i])]; + } if (!preg_match("@^https?://@", $article['file'.$i]) && $article['file'.$i] != "") { @@ -274,7 +280,7 @@ # save galley data $galleys[$fileId] = "\t\t\t\t\r\n"; - $galleys[$fileId] .= "\t\t\t\t\t".$article['fileLabel'.$i]."\r\n"; + $galleys[$fileId] .= "\t\t\t\t\t".$article['fileLabel'.$i]."\r\n"; $galleys[$fileId] .= searchLocalisations('fileLabel'.$i, $article, 5, 'name'); $galleys[$fileId] .= "\t\t\t\t\t".$fileSeq."\r\n"; @@ -286,7 +292,7 @@ if (preg_match("@^https?://@", $article['file'.$i]) && $article['file'.$i] != "") { # save remote galley data $galleys[$fileId] = "\t\t\t\t\r\n"; - $galleys[$fileId] .= "\t\t\t\t\t".$article['fileLabel'.$i]."\r\n"; + $galleys[$fileId] .= "\t\t\t\t\t".$article['fileLabel'.$i]."\r\n"; $galleys[$fileId] .= searchLocalisations('fileLabel'.$i, $article, 5, 'name'); $galleys[$fileId] .= "\t\t\t\t\t".$fileSeq."\r\n"; $galleys[$fileId] .= "\t\t\t\t\t\r\n";