[wikka-community] Date displaying -- let's add a function

Krzysztof Trybowski trybowski
Sun Apr 13 10:53:22 GMT 2008

Hello all,
another issue connected with translating Wikka's UI is date
displaying. There are many places in code where it's stated that date
displaying should be customizable.

While I agree with that, I am certain that simply using PHP's build-in
capabilities for that is not enough.

The reason for that is... you probably have just guessed... LANGUAGE
COMPLEXITY. Let's take the example of Polish language.

Today is 13th April. April is "kwiecie?" in Polish.

But simply writing "13 kwiecie? 2008" is wrong. The correct form is
"13 kwietnia 2008" -- "kwietnia" being genitive from "kwiecie?".

It's quite trivial to write a function that would format the date
correctly. Using locale for that, is not quite as good for two reasons:
* there may be no certain locale installed on the server,
* setting a locale has some further implications with decimal and
thousand separators (using comma instead of period) that can cause

That above second point reminds me, that we could also use function
for displaying and inputting numbers. While internally Wikka should
stick with English "3.5", it should be possible to display "3,5" and
it should understand when someone inputs a number with a comma (based
on currently used language pack).

Therefore my vote is to:
 -- create a common date-formatting function for Wikka
 -- use that function throughout the system
 -- make it possible for language pack to override the default function
    with customized one.

 -- evaluate the possibility to do similarly for numbers.

Your opinions are welcome.

Regards, KT

Krzysztof Trybowski
  Gadu-Gadu: 1458144 --- Skype: trybowski
  AQQ: 141062 --- ICQ: 4350719 --- gpg key-id: 0x1245B774

More information about the community mailing list