# inflect.Humanize
> 返回输入的人性化形式，并大写首字母。
- 官方英文原文：https://gohugo.io/functions/inflect/humanize/
- 本页规范地址：https://hugozh.cn/functions/inflect/humanize/
- 最近更新：2026-10-02
- 最后提交：912b1d3 chore(site): 添加 static/CNAME（hugozh.cn），供 GitHub Pages 等平台绑定自定义域名
- 签名：inflect.Humanize INPUT
- 返回类型：string
- 站点：Hugo 中文文档（https://hugozh.cn/）· 社区维护的非官方中文翻译，如有出入以官方英文原文为准

---
```go-html-template
{{ humanize "my-first-post" }} → My first post
{{ humanize "myCamelPost" }} → My camel post
```

如果输入是整数或整数的字符串表示，humanize 会返回附加了正确序数词尾的数字。

```go-html-template
{{ humanize "52" }} → 52nd
{{ humanize 103 }} → 103rd
```

