Fork me on GitHub

change calendar in new lang  Bottom

  • Hi All,

    i'm trying to translate zikula to persian language and i want release it on Cozi.
    one of the most important things that can call persian people to use zikula is their local calendar.
    current calendar of zikula is 'Gregorian calendar'. e.g dates printed like this: December 24 2008
    but persian calendar is different from Gregorian calendar (more info is in wikipedia). and i have some functions that can change this type of date to another.
    i want to change all dates that printed in zikula. like news, pages, themes, ephemerids and other but in persian language only.
    please help me that how can i do that? or tell me where can i include that functions and where must call they? thank you.
  • can't anyone help me? i want to increase usage of zikula in persia land. if you can't understand my question please tell me to clarify it.
  • I'm not sure how to do it.

    I know that you can make changes to the calendar formatting by changing the code and you can change the lang files as well but I don't know how to specify the changes for only Persian.

    Depending on the calendar module you use, you may just need to release the newly scripted Persian calendar module when you release your lang pack and rename the module.

    This is definitely not ideal and someone else may have the right solution.

    I just didn't want you to think we didn't care. It is the holidays right now so many people are away from the forums, be patient.
  • I don't think he's talking about a calendar module specifically, but about the way the date is displayed.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Yes, i'm don't talking about calendar module. you can think that i want to change display type of users 'registered' date of 'Dizkus' module. for example my last visit from this forum is 27.12.08 but it must show 1387-10-07 in persian lang. i want to change type of this date from 'Gregorian calendar' to 'persian calendar'(some times called iranian calendar or jalaali calendar).
    for understand my request you can visit from this site. you can change a gregorian date to jalaali for see how it work.
  • can anyone of zikula developers help me?! i decide to release persian community zikula 1.1.0 these days.
  • Check in the docs for PHP and see if it's built in or not. Otherwise you'll probably have to recode the date functions in Zikula to accomplish what you need.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • HalbrookTech

    Check in the docs for PHP and see if it's built in or not. Otherwise you'll probably have to recode the date functions in Zikula to accomplish what you need.


    1- where are 'date functions' that i can recode those?
    2- can i include a PHP file in core zikula files at all?
  • Modifying DateUtil (as we talked in the IRC channel) may be the solution.
    The getDatetime method of that class (/includes/DateUtil.class.php on 1.1) is the most used function to get the date. In the beginning of the file there's a define with the default DateFormat, try to change it too.

    In the other hand, some templates uses a customized date format, and you probably need to customize them if you need them different. Also verify which defines of the /languages/*/code.php are used and if modifying them you can accomplish part of the job icon_wink

    --
    - Mateo T. -
    Mis principios... son mis fines

This list is based on users active over the last 60 minutes.