Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using the DL formatting (as seen on the docs page...) in a project of my own, and I've found today that vocab name isn't always suitable for public consumption.
Eg, it's "Story type" so in the admin I know what it relates to, but for display I maybe just want "Type".
A good way to do this would be to also load the vocab description ("modules use this"!) into the data in $node, like this:
$node->term_display[$vocabulary->vid]['vocabulary_desc'] = check_plain($vocabulary->description);
This can then be shown instead of the vocab name.