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!
You must log in to post.