@naja7host, why do you rely on modifying the core? You can easily create a new invoice template and simply extend the original template, without having to write much code.
/components/invoice_templates/custom_invoice/custom_invoice_pdf.php
<?php
require_once '../default_invoice/default_invoice_pdf.php';
CustomInvoicePdf extends DefaultInvoicePdf {}
/components/invoice_templates/custom_invoice/custom_invoice.php
<?php
require_once '../default_invoice/default_invoice.php';
require_once 'customer_invoice_pdf.php';
CustomInvoice extends DefaultInvoice {
public function __construct() {
parent::__construct();
Language::loadLang("custom_invoice", null, dirname(__FILE__) . DS . "language" . DS);
}
public function setMeta($meta) {
parent::setMeta($meta);
// Load different language for this template if given
if (isset($meta['language']))
Language::loadLang("custom_invoice", $meta['language'], dirname(__FILE__) . DS . "language" . DS);
$this->pdf = new CustomInvoicePdf("P", "px", $this->meta['paper_size'], true, 'UTF-8', false, $font);
// Set the meta data to use for this invoice
$this->pdf->meta = $this->meta;
}
}
Then just supply your own custom language file, you can even extend the language:
/components/invoice_templates/custom_invoice/language/en_us/custom_invoice.php
<?php
$lang['DefaultInvoice.invoice_id_code'] = "Number:";
$lang['DefaultInvoice.date_billed'] = "Date:";