Language date bug in PMS Language date bug in PMS
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Language date bug in PMS

Started by Fabricio Ferrero, April 21, 2008, 05:17:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fabricio Ferrero

I tried to change language of the date that is shown on private message (received date) and it is impossible.

My default language it's Spanish, I translated all days and months in language Spanish file, but still I'm unable to get the Spanish date.

Fallback language (or similar function) it's set to NO. Despite that, I translated the days and moths on English and english_gb just in case, still no luck.

Any suggestion?
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Stramm

If you mean the date format, then this can be changed in config

Fabricio Ferrero

No, I said "language". Not date format. CPG shows: "Hoy - Monday 21st 2008f April 2008" Inestead of "Hoy (today) - Lunes 21 del 2008, Abril 2008"

I said a BUG because I traslate all files where the pm* could get the date from and still in english. So, where is the phpsend gettind the date from? And why is 2 times the 2008 shown.

There is no "monday" or "april" word in spanish file, english, english_gb, pmsend, pm.inc (or similar) or in any file. So, if the language fallback it is set to NO, where is getting the "monday" from?
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

Stramm

See, you've asked and I've answered. You didn't even verify what I've said but jump on me saying it's not true and a bug.

The date is just a number like 1183805429. Out of that number you calculate a formatted date/ time. How in the end this will look is determind by the date format. Googling for 'date' 'php' 'date format' would of course have led to numerous sites explaining this. The date format you can set in config. Still the same answer as above as you see.

Shouting bug isn't very polite as well. A bug is an error in the code. If if you wouldn't be able to change the date format it'll be no error as all what has been coded is working perfect. It'll be a missing feature.

more about date format here http://php.net/manual/en/function.date.php
examples
'r'  -> RFC formatted time
'd.m.Y' -> eg. 31.01.2008
'l, the js F Y'  -> Monday, the 2nd January 2008