diff --git a/application/controllers/admin/export.php b/application/controllers/admin/export.php index b7efd996b5b..150d616d35e 100644 --- a/application/controllers/admin/export.php +++ b/application/controllers/admin/export.php @@ -1040,6 +1040,8 @@ public function showquexmlsurvey() Yii::import("application.libraries.admin.quexmlpdf", TRUE); $quexmlpdf = new quexmlpdf($this->getController()); + $quexmlpdf->setLanguage($surveyprintlang); + set_time_limit(120); $noheader = TRUE; diff --git a/application/libraries/admin/quexmlpdf.php b/application/libraries/admin/quexmlpdf.php index 7708e3bd618..7026f19d835 100644 --- a/application/libraries/admin/quexmlpdf.php +++ b/application/libraries/admin/quexmlpdf.php @@ -40,6 +40,11 @@ class quexmlpdf extends pdf { */ const INCH_IN_MM = 25.4; + /** + * Language for translation + */ + protected $language = "en"; + /** * Pixels per inch of exported document * @@ -715,6 +720,12 @@ class quexmlpdf extends pdf { */ protected $sectionHeight = 18; + public function setLanguage($language) + { + if (!empty($language)) + $this->language = $language; + } + /** * Return the length of the longest word * @@ -1325,6 +1336,8 @@ public function getQuestionnaireId() */ public function createqueXML($quexml) { + $clang = new limesurvey_lang($this->languauge); + $xml = new SimpleXMLElement($quexml); $q = array(); @@ -1356,7 +1369,7 @@ public function createqueXML($quexml) { $stmp = array(); $sl = $this->numberToLetter($scount); - $stmp['title'] = "Section " . $sl; + $stmp['title'] = $clang->gT("Section") . " " . $sl; $stmp['info'] = ""; $stmp['text'] = "";