Attach Invoice Plugin wrong language for dates

  • Posts: 78
  • Thank you received: 0
10 years 3 months ago #190205

-- 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.

  • Posts: 13201
  • Thank you received: 2322
10 years 3 months ago #190209

Hi,

You have to edit the file "plugins/hikashop/attachinvoice/attachinvoice/invoice.php", and replace the date format in the line:

<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.

  • Posts: 78
  • Thank you received: 0
10 years 3 months ago #190262

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.

  • Posts: 83930
  • Thank you received: 13585
  • MODERATOR
10 years 3 months ago #190340

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.

  • Posts: 78
  • Thank you received: 0
10 years 3 months ago #190360

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.

  • Posts: 83930
  • Thank you received: 13585
  • MODERATOR
10 years 3 months ago #191621

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.060 seconds
Powered by Kunena Forum
loading