Forums

Google Calendar Widget plugin by Otto. How to translate date? (2 posts)

  1. smartec
    Member
    Posted 2 months ago #

    http://ottodestruct.com/blog/2006/google-calendar-widget/
    I chose this plugin because is simply the best solution I found, even if is old.

    My only problem is with date translation.

    Is driving me crazy :o

    I tried translating locale.php... nothing happens

    As you can see here...

    http://www.eurtorrino.net

    and here

    http://www.vivarovere.it

    ... date in gcal plugin is the only non-localized thing

    I hope you will help me

    Thank you in advance

  2. Otto42
    Moderator
    Posted 1 month ago #

    That calendar widget is so old that it never got any form of localization or translation added to it. I'm amazed it still works, actually.

    However, it does use the globals for things like $weekday_abbrev and such, so if you're using a WordPress that is translated to another language, it should use those abbreviations for weekdays and such... but only on the calendar display mode.

    On the text display mode, the plugin is just using PHP date() calls to output date info, which won't translate.

    So, you can try changing calls like this:
    date($dateformat,$stuff[$iter]['date'])

    into this:
    mysql2date($dateformat,$stuff[$iter]['date'])

    That might make it translate properly.

Reply

You must log in to post.

About this Topic