Advertisement:
Anonymous Login
12-07-2016 09:22 AM

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

-Relationships
+Relationships

-Notes

bugnote:0001013

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.

bugnote:0001014

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() @ http://aaronweb.net/poof.php

bugnote:0001183

Aaron (SMF Friend)

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.

bugnote:0002219

Aaron (SMF Friend)

Seems to be okay in latest 2.0 CVS

bugnote:0004429

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.

bugnote:0005313

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.

bugnote:0006164

Aaron (SMF Friend)

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