Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • Harikalar Kutusu Friend
    #160785

    Hi,

    I saw it when working on JA Events template, but it can be the case for any template.

    For example in templatesja_eventshtmlcom_contentfrontpagedefault_item.php :
    [PHP]
    $createDay = date(‘d’, strtotime( $this->item->created));
    $createMonth = date(‘M’, strtotime( $this->item->created));
    $createYear = date(‘Y’, strtotime( $this->item->created));
    [/PHP]

    As you know some options in PHP’s date function returns English wording for month or day names/abbreviations.

    Please make use of strftime function instead, as it returns correct internationalized strings depending on locale.

    [PHP]
    $createMonth = strftime(‘%h’, strtotime( $this->item->created));
    [/PHP]

    Thanks

    Phill Moderator
    #378681

    Excellent suggestion that and one I will flag up.

    Harikalar Kutusu Friend
    #378688

    That’s good to hear 🙂

    Actually it is part of the Joomla guidelines:

    http://docs.joomla.org/Language_Guidelines_for_3rd_Party_Extensions

    Thank you again 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 3 replies, has 2 voices, and was last updated by  Harikalar Kutusu 13 years, 8 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum