I want to build an automation to generate the invoice in the language the order was placed but I don't really understand how to force language for the actual invoice generator.
The code to detect the language in which the order was placed should be rather simple:
Code: Select all
if ($order_info['language_id']=='1')
$inv_lang = 'language1';
elseif ($order_info['language_id']=='2')
$inv_lang = 'language2';
else
$inv_lang = 'wtf';
I did not yet discover how to change the default
Code: Select all
$this->load->language('sale/order');
Does anybody have an idea how this can be done?