# Hugo Multilingual Collection Translation: Solving the Language Switcher Issue With Different Display Names


## The Problem

In FixIt theme, collections are a custom taxonomy. If Chinese and English posts use different collection names:

```yaml
# zh-CN
collections: ["Podman 教程"]

# en
collections: ["Podman Tutorial"]
```

The language switcher on `/collections/` pages and post pages disappears. Hugo treats them as two separate taxonomy terms, so `.IsTranslated` and `.AllTranslations` return nothing.

Currently using Hugo v0.160.1.

## The Solution

The approach is straightforward: use the same collection name across all languages, and let `_index.md` provide localized display titles.

Take the `podman-tutorial` collection as an example. Create:

```
content/collections/podman-tutorial/
├── _index.zh-CN.md
└── _index.en.md
```

`_index.zh-CN.md`:

```markdown
---
title: "Podman 教程"
---
```

`_index.en.md`:

```markdown
---
title: "Podman Tutorial"
---
```

- Both languages share the URL `/collections/podman-tutorial/` (determined by the directory name)
- The Chinese display name is "Podman 教程"
- The English display name is "Podman Tutorial"
- No `translationKey` needed - same term name, Hugo auto-links them

## Post Configuration

Both language versions use the same collection name in frontmatter:

```yaml
# xxx.en.md
collections: ["podman-tutorial"]

# xxx.zh-CN.md
collections: ["podman-tutorial"]
```

That's it. The language switcher will work normally across all collection pages and posts.


---

> Author: Nite  
> URL: https://www.nite07.com/en/posts/hugo-multilingual-collection-translation/  

