Advertisement:

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000416SMF 2.0public2007-01-31 10:482008-11-08 14:47
ReporterAaron 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Summary0000416: Output of timeformat() is always capitalised
DescriptionAs SMF's timeformat() function uses $smcFunc['ucwords'] to capitalise all words in it, the day and month names in timestamps always have a capital. While this is correct in, for example, English and German, it is incorrect in, for example, Dutch and French.

I suggest we make the call to $smcFunc['ucwords'] optional on a per-language basis, by adding an extra boolean to the the top of index.{language}.php
TagsRC1
Attached Fileszip file icon forcedutchdates.zip [^] (1,035 bytes) 2007-03-08 09:24

- Relationships

-  Notes
(0001013)
Compuart (SMF Friend)
2007-02-04 16:00

SMF uses the locale settings from PHP for determining the date format. If there's no locale present (or the current locale is not supported by PHP) it falls back to SMF's language strings. Apparently PHP 4's locale is not formating the month name properly.
(0001014)
Aaron (SMF Friend)
2007-02-05 13:37

Thanks for looking into it, Compuart.

I can't find anything unordinary there, except for magic quotes being partly enabled. Would the issue be resolved if that option were disabled?

phpinfo() @ http://aaronweb.net/poof.php [^]
(0001183)
Aaron (SMF Friend)
2007-03-08 09:24

Right, time for an update on this. I'm currently using a workaround (attached, forcedutchdates.zip), but that does, of course, not solve the problem.

The setlocale() function works as it should, plus when called in a simple test script it works as it should as well:

<?php
setlocale(LC_ALL, 'nl_NL');
echo strftime("%A %B\n");
?>

Returns "donderdag maart", which is perfectly fine.

So my guess is SMF's $func['ucwords'] is the problem, as it is the word capitalisation function of SMF, and the Dutch dates shouldn't be capitalised?

Thanks,
Aaron.
(0002219)
Aaron (SMF Friend)
2007-09-21 03:50

Seems to be okay in latest 2.0 CVS
(0004429)
Aaron (SMF Friend)
2008-04-22 08:22

Looks like this is happening again. I'm running SMF 2.0 Beta 3 Public REV 7050. The fix - as given in the attached mod - still works in latest SVN (given you replace $func with $smcFunc etc), so I'm assuming it's a bug in SMF's $smcFunc['ucwords'] function.
(0005313)
Aaron (SMF Friend)
2008-08-03 13:00

This is still happening in the latest version. Whilst this isn't urgent enough to delay beta 4 any longer, I do think this should be fixed in the final version.
(0006164)
Aaron (SMF Friend)
2008-11-08 14:47

 & Made capitalization of forum timestamps optional on a per-language basis. (Subs.php, index language file) Revision 7640
MantisBT 1.2.8 (Modified)[^] Copyright © 2000 - 2010 Mantis Group