Anonymous Login
06-18-2018 04:57 PM

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0000416SMF 2.0public2008-11-08 14:47
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
Attached Files




Compuart (SMF Friend)

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.


Aaron (SMF Friend)

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() @


Aaron (SMF Friend)

Right, time for an update on this. I'm currently using a workaround (attached,, 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:

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?



Aaron (SMF Friend)

Seems to be okay in latest 2.0 CVS


Aaron (SMF Friend)

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.


Aaron (SMF Friend)

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.


Aaron (SMF Friend)

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