[wp-hackers] Weekday abbreviations and localization
Ryan Boren
ryan at boren.nu
Thu Jul 1 15:54:45 UTC 2004
On Thu, 2004-07-01 at 11:23 +0200, Luca Lizzeri wrote:
> Ryan,
>
> >That's a known bug that I really need to get around to fixing. That
> >hack does not work for multi-byte languages.
> >
> >
> So, would this be better, or is mb_substr not deployed widely enough ?
It's not deployed widely enough. Plus, some languages such as Hebrew
use a different letter than the first letter in the day name when
abbreviating that day down to one letter. So, sub-string operations are
out.
Ryan
> --- template-functions-general.php.orig 2004-06-14 17:05:00.000000000 +0200
> +++ template-functions-general.php 2004-07-01 11:20:35.703125000 +0200
> @@ -367,13 +367,8 @@
> <thead>
> <tr>';
>
> - $day_abbrev = $weekday_initial;
> - if ($daylength > 1) {
> - $day_abbrev = $weekday_abbrev;
> - }
> -
> foreach ($weekday as $wd) {
> - echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">" . $day_abbrev[$wd] . '</th>';
> + echo "\n\t\t<th abbr=\"$wd\" scope=\"col\" title=\"$wd\">" . mb_substr($wd, 0, 1) . '</th>';
> }
>
> echo '
>
>
> Cheers,
> Luca Lizzeri
>
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
--
Ryan Boren <ryan at boren.nu>
More information about the hackers
mailing list