WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Availability Calendar] how to change months language?

[Resolved] [Plugin: Availability Calendar] how to change months language?

Viewing 8 replies - 1 through 8 (of 8 total)
  • I would also love to learn about this. The easiest way would be hard coding the months’ names just like the days’ abbreviations in calendar.php

    Pleeaase!-)

    Hi there!
    Add this array at the beginning of the for-loop in calendar.php:

    <?php for ($month = 1; $month <= 12; $month++) : ?>
    <?php
    $trans = array (
        'January'   => 'Januar',
        'February'  => 'Februar',
        'March'     => 'März',
        'May'       => 'Mai',
        'June'      => 'Juni',
        'July'      => 'Juli',
        'October'   => 'Oktober',
        'December'  => 'Dezember',
    );
    $ger_month = date('F Y', mktime(0, 0, 0, $month, 1, $this->year));
    $ger_month = strtr($ger_month, $trans);
    ?>

    And change

    <th colspan="7"><?=date('F Y', mktime(0, 0, 0, $month, 1, $this->year))?></th>

    into:

    <th colspan="7"><?php echo $ger_month;?></th>

    You can add the ignored months (cause they are equal to german) in the array to change them into other languages.

    Thanks, worked great for me!

    how would this work in a multilingual site?

    Fantastic – thanks!-)

    Hi all,

    It’s been a while since I have made any adjustments to this particular plugin. Today there was some time to re-visit it and I have made a number of adjustments.

    • Bug fix for changing calendars when using the default permalink structure.
    • Changed permissions to allow users with page edit permission to manage calendars.
    • Calendar output now conforms to the “Week Starts On” setting found in “Settings > General”.
    • Month and day names now make use of localisation.
    • Introduction of multiple calendars.
    • Added ability to exclude the default stylesheet.
    • The number of years shown can now be modified.
    • Fixed unexpected output during activation.
    • Moved uninstall process to uninstall.php.

    If anyone can help test the version in development it would be greatly appreciated.

    http://downloads.wordpress.org/plugin/availability.zip

    Please note there is a possibility that this plugin is unstable.

    Thanks.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] [Plugin: Availability Calendar] how to change months language?’ is closed to new replies.