Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-08-15 13:21:45

poczciwy
New Member
Registered: 2010-08-15
Posts: 3

[solved] Month names in Polish

Hello, it’s my first post :)

Textpattern doesn’t properly use Polish month names. When we describe date using day, month and (optional) year, then we use:
  • ordinal number for day: 15. (with dot! – it means 15th),
  • month name in genitive case: sierpnia (starting with a lower case).
    For example:
  • 15. sierpnia
  • 15. sierpnia 2010 (it means 15th day of August. 15 sierpień means August number 15)
  • sierpnia 15., 2010 (not using)
When we describe date without day (e.g. August 2010), then we use month name (starting with lower case) in nominative case, for example:
  • sierpień 2010

It’s possible to fix this problem?

btw list of month names:

english January February March April May June
nominative styczeń luty marzec kwiecień maj czerwiec
genitive stycznia lutego marca kwietnia maja czerwca
english July August September October November December
nominative lipiec sierpień wrzesień październik listopad grudzień
genitive lipca sierpnia września października listopada grudnia

Last edited by poczciwy (2010-08-16 06:56:03)

Offline

#2 2010-08-15 14:50:21

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [solved] Month names in Polish

It’s not Textpattern, but PHP that generates the date strings, see: http://php.net/strftime
I don’t think strftime can make the distinction between nominative and genitive month names. You’d need a %OB format character for that and support from the OS. Here’s what I found about OS support:

* Solaris 10:
   * does not understand %OB
   * %B seems to return the genitive form
   * the "short" locale names seem to link to the non-utf8 forms (iso-8859-1 or so)
   * encoding seems to match the locale charset
   * all Serbian variants are cyrillic
 * FreeBSD 6.2, 7.0, 7.2:
   * understands %OB, which is usually the nominative form of month names
   * %B has the genitive form (modulo bugs, see the Croatian locale)
   * encoding matches the locale charset
   * the ISO8859-2 variant of Serbian is latin, all others are cyrillic
   * it seems that all of locales are installed by default
 * Linux (debian lenny):
   * does not understand %OB
   * encoding seems to match the locale charset
 * Linux (debian etch):
   * does not understand %OB
   * %B returns the nominative form (at least for Croatian)
   * encoding seems to match the locale charset
   * the "short" locale names seem to link to the non-utf8 forms (iso-8859-1 or so)
 * Linux (s390x-linux):
   * does not understand %OB
   * %B returns the nominative form (at least for Bosnian and Czech)
   * the @euro form seems to be the same like the "short" locale (that is, iso-8859-15 or so)
 * OpenBSD 4.5:
   * does not seem to have the "locales -a" command, so only the default locale was tested
   * understands %OB, contents (genitive vs. nominative) unclear
 * Darwin 8:
   * understands %OB, and seems to have the same bugs as the FreeBSD version
     (Croatian locale)
   * encoding matches the locale charset
   * the ISO8859-2 variant of Serbian is latin, all others are cyrillic
   * it seems that all of locales are installed by default
 * MSWin32:
   * does not understand %OB
 * cygwin:
   * does not seem to have the "locales -a" command, so only the default locale was tested
   * understands %OB, contents (genitive vs. nominative) unclear
 * irix 6.5:
   * does not understand %OB
   * does not have utf-8 locales, but iso-8859-15 locales
   * the non-latin-1 locales (latin2, russian) don't have an encoding spec in its
     locale name, so detecting the encoding must be done through an heuristic

Offline

#3 2010-08-15 17:39:01

poczciwy
New Member
Registered: 2010-08-15
Posts: 3

Re: [solved] Month names in Polish

I guessed that is caused by php – there is no month names in languages files in textpattern instalation. Solution is adding new functionality to textpattern – month names declesion (if there are other languages with this problem) – or creating a plugin.
A few years ago the same problems had users of wordpress. They choose plugin solution . I intend to look at this, but actually I’m not familiar with php ;)

Offline

#4 2010-08-16 01:10:01

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: [solved] Month names in Polish

poczciwy wrote:

They choose plugin solution

May I suggest one: rah_replace

Example:

<txp:rah_replace from="styczeń,luty,etc" to="stycznia,lutego,etc">
	<txp:posted format="%d. %B %Y" />
</txp:rah_replace>

This covers at least the client side.

Last edited by uli (2010-08-16 01:10:12)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#5 2010-08-16 06:54:11

poczciwy
New Member
Registered: 2010-08-15
Posts: 3

Re: [solved] Month names in Polish

It works!
Thanks uli, you are great

Offline

#6 2010-08-16 10:28:02

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: [solved] Month names in Polish

I pass it on to Gocom, the plugin author.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#7 2010-08-16 12:27:12

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [solved] Month names in Polish

Someone said “Gocom”? ;-)

Offline

#8 2010-08-16 14:07:35

maniar
Member
From: Hamilton, Ontario
Registered: 2010-01-04
Posts: 66
Website

Re: [solved] Month names in Polish

Now this is something I was looking for to replace the date names to Arabic ! W00T ! :-)


اردو میں بھی دستیاب Textpattern آپ کے لیے اب

Offline

#9 2010-08-16 22:57:20

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,306

Re: [solved] Month names in Polish

maniar wrote:

Now this is something I was looking for to replace the date names to Arabic ! W00T ! :-)

<txp:rah_replace from="styczeń" to=" كانُون  الثَّانِي">
	<txp:posted format="%d. %B %Y" />
</txp:rah_replace>

;-)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#10 2010-08-17 00:05:53

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: [solved] Month names in Polish

I bet it can’t do lolcats.

Offline

Board footer

Powered by FluxBB