[wp-hackers] Weekday abbreviations and localization

Luca Lizzeri luca.lizzeri at ngi.it
Thu Jul 1 08:34:36 UTC 2004


The way localization is handled right now creates some problems for the 
weekday abbreviations:

In Italian we have:
tuesday -> martedì
wednesday -> mercoledì
thursday -> giovedì

The one word abbreviations, with the one-letter translations, become:
t -> m
w -> m
t -> m (instead of g)

This is unsatisfying. I am using the following hack in my installation 
at http://www.wikilab.net

--- template-functions-general.php.orig    2004-06-14 17:05:00.000000000 
+0200
+++ template-functions-general.php    2004-07-01 10:26:50.812500000 +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\">" . 
$wd[0] . '</th>';
     }
 
     echo '

Cheers,
    Luca Lizzeri



More information about the hackers mailing list