I have installed the "availability" plugin and it works fine. Now I want to change the months in my language. Could you please help me with this?
thank you.
I have installed the "availability" plugin and it works fine. Now I want to change the months in my language. Could you please help me with this?
thank you.
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.
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.
This topic has been closed to new replies.