humanize_identifier

Convert an underscore-separated identifier to a readable label.

Replaces underscores with spaces and uppercases the first Unicode character. The remaining characters keep their original case. Accepts an atom, binary, or string and returns a binary. An empty value or undefined returns <<>>.

For example:

{{ identifier|humanize_identifier|escape }}

When identifier is media_management, the output is Media management.

This filter formats the identifier directly without translating it or looking up a label. It does not split camelCase or replace hyphens. The result is plain text; use escape when displaying it in HTML.

Edit on GitHub