Language month translation

  • Posts: 1119
  • Thank you received: 114
6 years 4 months ago #283250

Hi,

I got some strange issue and looking for advise here.

Making some modification in view-> order / show.php

Using code below to display some date:

<?php if ($this->order->order_shipping_id == '9') {
echo strftime("%B %e, %Y", strtotime(' + 6 weekday'));?>


The issue is that month is not translated. It is always set to English.
As a quick fix i had to use setLocale based on language tag.

Any advise please?

Thanks

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 4 months ago #283256

Hello,

I'm afraid that your question is not related to HikaShop but to PHP development.
If you want more details about the "strftime" PHP function : us3.php.net/manual/en/function.strftime.php
Afterwards, you can also take a look at the Joomla core function regarding the dates.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 1119
  • Thank you received: 114
6 years 4 months ago #283320

Hi,

Thanks for pointing it out Jerome. Forgot that instead of using php strftime i could use Joomla date format. That had fixed all my troubles and less coding.

Have a great day

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

Time to create page: 0.057 seconds
Powered by Kunena Forum