# IsTranslated
> 报告给定页面是否有一个或多个翻译版本。
- 官方英文原文：https://gohugo.io/methods/page/istranslated/
- 本页规范地址：https://hugozh.cn/methods/page/istranslated/
- 最近更新：2026-10-02
- 最后提交：912b1d3 chore(site): 添加 static/CNAME（hugozh.cn），供 GitHub Pages 等平台绑定自定义域名
- 签名：PAGE.IsTranslated
- 返回类型：bool
- 站点：Hugo 中文文档（https://hugozh.cn/）· 社区维护的非官方中文翻译，如有出入以官方英文原文为准

---
使用如下项目配置：

```toml
defaultContentLanguage = 'en'

[languages.en]
contentDir = 'content/en'
label = 'English'
locale = 'en-US'
weight = 1

[languages.de]
contentDir = 'content/de'
label = 'Deutsch'
locale = 'de-DE'
weight = 2
```

内容如下：

```tree
content/
├── de/
│   ├── books/
│   │   └── book-1.md
│   └── _index.md
├── en/
│   ├── books/
│   │   ├── book-1.md
│   │   └── book-2.md
│   └── _index.md
└── _index.md
```

渲染 `content/en/books/book-1.md` 时：

```go-html-template
{{ .IsTranslated }} → true
```

渲染 `content/en/books/book-2.md` 时：

```go-html-template
{{ .IsTranslated }} → false
```

