# Names of months in Archive Extension

**URL:** <https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031>\
**Category:** Radiant CMS\
**Created:** [October 23, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031 "2007-10-23T13:33:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 23, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/1 "2007-10-23T13:33:01Z")

</div>

Hi,

I want to have listed archive with months and years in polish language.  
By default this is english language. If I use command:  
“\<r:date format=”%B %Y" /\>" I got for example June 2007. Instead of  
“June” I want to have polish equivalent. What I have to do??

Regards, Artur

---

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 23, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/2 "2007-10-23T15:09:40Z")

</div>

Artur B. wrote:

> I want to have listed archive with months and years in polish language.  
> By default this is english language. If I use command:  
> “\<r:date format=”%B %Y" /\>" I got for example June 2007. Instead of  
> “June” I want to have polish equivalent. What I have to do??

I’d suggest that you create a set of polish date tags in an extension.  
You may need to copy the Archive pages as well.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 23, 2007, 3:20pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/3 "2007-10-23T15:20:12Z")

</div>

Also consider that this is a limitation of Ruby and not necessarily  
Radiant. You may need to find a library that overrides the Date, Time,  
and DateTime classes to localize date names.

Sean

---

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 23, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/4 "2007-10-23T15:58:16Z")

</div>

±le 23.10.2007 13:33:01 +0200, Artur B. a dit :  
| Hi,  
|  
| I want to have listed archive with months and years in polish language.  
| By default this is english language. If I use command:  
| “\<r:date format=”%B %Y" /\>" I got for example June 2007. Instead of  
| “June” I want to have polish equivalent. What I have to do??

You’ll need some kind of polish extension, like the one I made for  
french  
dates[1].

Regards,

1: [http://mat.cc/dev/index.cgi/french\_dates/](http://mat.cc/dev/index.cgi/french_dates/)  
and [http://mat.cc/dev/index.cgi/french\_dates/archive/tip.tar.gz](http://mat.cc/dev/index.cgi/french_dates/archive/tip.tar.gz)

---

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 23, 2007, 4:59pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/5 "2007-10-23T16:59:10Z")

</div>

You can try to overwrite Ruby’s month constants with backdoor:

\<r:ruby\>  
Date.MONTHNAMES = [nil] + %w(January February March April May  
June  
July August September October November December)  
Date.ABBR\_MONTHNAMES = [nil] + %w(Jan Feb Mar Apr May Jun Jul Aug  
Sep  
Oct Nov Dec)  
\</r:ruby\>

```
May work, nor not. Not tested.

/AITOR
```

---

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 24, 2007, 10:19am UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/6 "2007-10-24T10:19:05Z")

</div>

Artur,

I am using a Rails plugin called Dutchify. Its code may help you develop  
a Polify, or someting like that.  
Dutchify is quite dirty as it overrides the Ruby date and time classes.  
Works well though.

Don’t forget to restart Radiant after you install this plugin 😉

Regards,  
Erik.

Sean C. wrote:

> > John L.

–  
Erik van Oosten  
[http://2008.rubyenrails.nl/](http://2008.rubyenrails.nl/)

> **[Day to day stuff](http://day-to-day-stuff.blogspot.com/)**
>
> Experiences from a hard core JVM programmer. Likes to keep things simple.

---

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 25, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/7 "2007-10-25T16:01:12Z")

</div>

±le 25.10.2007 15:43:15 +0200, Artur B. a dit :  
| Mathieu A. wrote:  
|\> ±le 23.10.2007 13:33:01 +0200, Artur B. a dit :  
|\> | Hi,  
|\> |  
|\> | I want to have listed archive with months and years in polish language.  
|\> | By default this is english language. If I use command:  
|\> | “\<r:date format=”%B %Y" /\>" I got for example June 2007. Instead of  
|\> | “June” I want to have polish equivalent. What I have to do??  
|\>  
|\> You’ll need some kind of polish extension, like the one I made for  
|\> french  
|\> dates[1].  
|\>  
|\> Regards,  
|\>  
|\> 1: [http://mat.cc/dev/index.cgi/french\_dates/](http://mat.cc/dev/index.cgi/french_dates/)  
|\> and [http://mat.cc/dev/index.cgi/french\_dates/archive/tip.tar.gz](http://mat.cc/dev/index.cgi/french_dates/archive/tip.tar.gz)  
|  
| I’ve downlaod your extension and try to install, but got error during  
| rake:  
|  
| rake aborted!  
| undefined method `to_datetime' for class `Time’

Hum, I have no clue about that, because, hum, it works for me.  
The \<require ‘date’\> should take care of creating the private methods, I  
don’t see why it does not for you.

Maybe an old ruby version ?

---

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 25, 2007, 3:43pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/8 "2007-10-25T15:43:15Z")

</div>

Mathieu A. wrote:

> ±le 23.10.2007 13:33:01 +0200, Artur B. a dit :  
> | Hi,  
> |  
> | I want to have listed archive with months and years in polish language.  
> | By default this is english language. If I use command:  
> | “\<r:date format=”%B %Y" /\>" I got for example June 2007. Instead of  
> | “June” I want to have polish equivalent. What I have to do??
> 
> You’ll need some kind of polish extension, like the one I made for  
> french  
> dates[1].
> 
> Regards,
> 
> 1: [http://mat.cc/dev/index.cgi/french\_dates/](http://mat.cc/dev/index.cgi/french_dates/)  
> and [http://mat.cc/dev/index.cgi/french\_dates/archive/tip.tar.gz](http://mat.cc/dev/index.cgi/french_dates/archive/tip.tar.gz)

I’ve downlaod your extension and try to install, but got error during  
rake:

rake aborted!  
undefined method `to_datetime' for class `Time’

Any suggestions?

---

<div class="post-metadata">

**Author:** ![ar2ras](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/ed655f/32.png) [@ar2ras](https://www.ruby-forum.com/u/ar2ras)\
**Post date:** [October 25, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/names-of-months-in-archive-extension/118031/9 "2007-10-25T18:27:42Z")

</div>

My ruby version:

ruby 1.8.5 (2006-12-04 patchlevel 2).

It’s to old ?
