
We're working hard on making Blogware available in a number of languages. In the meantime, for those of you who want the Calendar component to be in a language other than English (or spanish as of January 10th), here's a quick fix that changes its language. So if the fifth month of 2005 displays on your blog like so:

...I'll show you how you can customize the component so it displays like this:

Let's start with German.
First, here's a quick reminder of what the names of months in German are. Note that some of them are spelled the same as the English equivalent.
| Englisch | Deutsch |
|---|---|
| January | Januar |
| February | Februar |
| March | März |
| April | April |
| May | Mai |
| June | Juni |
| July | Juli |
| August | August |
| September | September |
| October | Oktober |
| November | November |
| December | Dezember |
Here are the German days of the week:
| Englisch | Deutsch | Abbreviation |
|---|---|---|
| Monday | Montag | Mo |
| Tuesday | Dienstag | Di |
| Wednesday | Mittwoch | Mi |
| Thursday | Donnerstag | Do |
| Friday | Freitag | Fr |
| Saturday | Sammstag (Sonnabend in some parts of Germany) | Sa |
| Sunday | Sonntag | So |
To create a custom component, you need to go to the Publisher Control Panel and select the Look and Feel section. Within that section, select Layout.

Once you're on the Layout page, select the Components tab. The page should now look something like this:

In this case, we want to customize an existing component, the Calendar component. In the list marked System Components, click the Customize link that corresponds to the Calendar component. The Add Custom Component window will appear:

The Content text box determines what appears inside the Calendar component.
The names of the days are right in the HTML in the content text box. The part of the HTML that defines them looks like this:
<td class="componentCalendarDayname">Sun</td>Simply change the "Sun", "Mon" and other English day name abbreviations to the ones for the language you want to use. In the case of German, the code should look like this:
<td class="componentCalendarDayname">Mon</td>
<td class="componentCalendarDayname">Tue</td>
<td class="componentCalendarDayname">Wed</td>
<td class="componentCalendarDayname">Thu</td>
<td class="componentCalendarDayname">Fri</td>
<td class="componentCalendarDayname">Sat</td>
<td class="componentCalendarDayname">So</td>Changing the month displayed is trickier. That's because the Calendar component displays the current month for the articles being viewed. For example, if you're viewing today's articles, today being January 6, 2005, the Calendar component will display "January". If you're viewing last August's articles, it will display "August".
<td class="componentCalendarDayname">Mo</td>
<td class="componentCalendarDayname">Di</td>
<td class="componentCalendarDayname">Mi</td>
<td class="componentCalendarDayname">Do</td>
<td class="componentCalendarDayname">Fr</td>
<td class="componentCalendarDayname">Sa</td>
The bit of Calendar component code that displays the month name is shown below:
<tr>{{calendar.month}} is a template variable. When Blogware generates a blog page, it replaces template variables with the values they contain. {{calendar.month}} gets replaced with the English name of the month corresponding to the article the reader is currently reading.
<th colspan="7">{{calendar.month}} {{calendar.year}}</th>
</tr>
We can use a little JavaScript to make a translator that converts English month names to the language of our choice. In this case, let's go with German.
To do this, we'll replace:
{{calendar.month}}with this:<script language="javascript"><!--Once you've done this, click the Add Component button to save your changes.
englishMonth = "{{calendar.month}}";
if (englishMonth == "January") germanMonth = "Januar";
else if (englishMonth == "February") germanMonth = "Februar";
else if (englishMonth == "March") germanMonth = "März";
else if (englishMonth == "May") germanMonth = "Mai";
else if (englishMonth == "June") germanMonth = "Juni";
else if (englishMonth == "July") germanMonth = "Juli";
else if (englishMonth == "October") germanMonth = "Oktober";
else if (englishMonth == "December") germanMonth = "Dezember";
else germanMonth = englishMonth;
document.writeln(germanMonth);
--></script>
You've just created a custom Calendar component. However, you're not done yet; you still have to add it to your blog's layout. Go to the Columns tab on the Layout page. In the Inactive column, you'll find your newly-created Custom calendar component; it'll be labelled Custom: Calendar. Drag it to the layout of your blog.

The original calendar will still be in your layout, so you need to put it away. Drag it to the Inactive column:

Click the Save button at the bottom of the page, and go look at your blog -- your calendar should be active!
Note that some of the names for months are spelled the same in English and German. This means that I wrote code that translated only those month names that differed between the two languages. In the case of languages with months completely unlike English, you should write JavaScript code that translates each month. For example, this code translates to Pig Latin:
<script language="javascript"><!--
englishMonth = "{{calendar.month}}";
if (englishMonth == "January") pigLatinMonth = "Anuaryjay";
else if (englishMonth == "February") pigLatinMonth = "Ebruaryfay";
else if (englishMonth == "March") pigLatinMonth = "Archmay";
else if (englishMonth == "April") pigLatinMonth = "Aprilyay";
else if (englishMonth == "May") pigLatinMonth = "Aymay";
else if (englishMonth == "June") pigLatinMonth = "Unejay";
else if (englishMonth == "July") pigLatinMonth = "Ulyjay";
else if (englishMonth == "August") pigLatinMonth = "Augustyay";
else if (englishMonth == "September") pigLatinMonth = "Eptembersay";
else if (englishMonth == "October") pigLatinMonth = "Octoberay";
else if (englishMonth == "November") pigLatinMonth = "Ovembernay";
else if (englishMonth == "December") pigLatinMonth = "Ecemberday";
else pigLatinMonth = englishMonth;
document.writeln(pigLatinMonth);
--></script>