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 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.
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.
±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].
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>
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
±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/
|> and 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.
±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].