@koichirose
Sorry for the delay in reply - busy week.
Firstly, what you have done regarding copying the ‘english/flexi_cart_lang.php’ file to ‘italian/flexi_cart_lang.php’ and translating the file is correct.
As for the hook, I’m not too familiar with using hooks in CodeIgniter, and from a quick attempt myself, I see your problem.
However, do you really need to set the language via a hook?
Typically, if you want to set a specific language you can define the language via CodeIgniters config.php file, by setting
$config['language'] = 'italian';
If you need a more variable solution, so that for example the language could be changed by a user on the site, you can define the language to use via the __construct() of the controller, just before the flexi cart library is loaded.
$this->lang->load('flexi_cart', 'italian');
$this->load->library('flexi_cart');
Would this be suitable?
Would you mind sharing the translated Italian language file with the library? I’ll be sure to credit your name to the file.
————————————————————————————————————————————————
@Patrick Spence
I’ve seen Stripe being mentioned about a fair bit.
As you say, the problem with developing for alot of payment processors is needing to create a financial account, but since you say Stripe doesn’t require this, i’ll have to give it a look when I get some time.