Skip to main content

Attach Invoice Plugin wrong language for dates

11 years 9 months ago #190205 by 121261
-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.2.3

HI in attach incoice plugin, the invoice is generated with english dates.
I need to change this...

How do I do this ??

Please advise and help

Please Log in or Create an account to join the conversation.

11 years 9 months ago #190209 by Xavier
Hi,

You have to edit the file "plugins/hikashop/attachinvoice/attachinvoice/invoice.php", and replace the date format in the line:
Code:
<div class="date"><?php echo JText::_('DATE').': '.hikashop_getDate($order->order_invoice_created,'%d %B %Y ');?></div>

Please Log in or Create an account to join the conversation.

11 years 9 months ago #190262 by 121261
Hi Xavier -
Sorry for asking, but I dont get it - I need the dates to be in our native language which is Danish - How would I do that ??

I thought, that hikashop followed the joomla language setting ?

Best regards
Bison

Please Log in or Create an account to join the conversation.

11 years 9 months ago #190340 by nicolas
Hi,

The PDF invoice plugin has its own date format. You can change it there as Xavier explained.
The format is compatible with Joomla's so just put the same format that you put in your Joomla translation file instead of %d %B %Y and you'll get what you want.

Please Log in or Create an account to join the conversation.

11 years 9 months ago #190360 by 121261
Hi Nicolas - The formatting of the date is correct - its the month names, that are wrong.
it says "January" in English, but I need the month names in Danish.

regards
Bison

Please Log in or Create an account to join the conversation.

11 years 9 months ago #191621 by nicolas
Hi,

The hikashop_getDate function which displays the date actually just calls the Joomla date function which generates the date. The Joomla date library should handle the translation of the date format just fine.
You can try to add the line:
<?php setlocale(LC_TIME, "nl_NL"); ?>
at the beginning of the invoice.php file and that should force the current language of the PHP date functions to dutch instead of english. It might help avoid the problem.

Please Log in or Create an account to join the conversation.

Time to create page: 0.106 seconds
Powered by Kunena Forum