[development] Changes to capitalization
Gabor Hojtsy
gabor at hojtsy.hu
Wed Sep 13 15:33:21 UTC 2006
On Wed, 13 Sep 2006, Boris Mann wrote:
> I'd prefer not to spend this cycle dealing with it, but punt to the
> beginning of the next cycle. I agree with Laura's comment that this
> doesn't achieve much of anything -- if it's consistently lower case
> (whether e.e. cummings-style Drupal-ism or not), let's leave it that
> way. Someone make a locale-pack if they want it a different way.
No need to make a locale pack, it is too resource intensive for such a
simple task. This is a themeing issue. We theme menu items and page titles
at weblabor.hu to be uppercase (not relying on CSS, but doing uppercasing
in PHP).
Default menu link theme function:
function theme_menu_item_link($item, $link_item) {
return l($item['title'], $link_item['path'],
array_key_exists('description', $item) ? array('title' =>
$item['description']) : array());
}
Our menu link theme function:
function azigazi_menu_item_link($item, $link_item) {
return l(wllib_ucfirst($item['title']), $link_item['path'],
array_key_exists('description', $item) ? array('title' =>
$items['description']) : array());
}
Look, it is so easy. Note that this is Drupal 4.6 theme code used on
Weblabor.hu. In Drupal 4.7, you have a built in drupal_ucfirst() function
to use. The wllib_ucfirst() function is our custom library function for
this, but does just the same.
To be honest, the above code does not fix lowercase menu items in help
text, but it was a nonissue for us.
Gabor
More information about the development
mailing list