Only translate category


I’m working with/in multilingual mode and I’m trying to translate my taxonomies like so:

German taxonomy structure:


English taxonomy structure:

Due to the fact that tags are both the same in german and english, this doesn’t give me a problem

[taxonomies] tags = "tags"

I simply don’t want mixed languages/wrong translations in my url permalink structure.

I’ve tried playing around with the config.toml

tags = “tags”
categories = “category”

to things like:
tags = “tags”
categories = “kategorie”
tags = “tags”
categories = “category”

Yet, I haven’t been able to find anything about it since most of the discussions are spinning around the taxonomy terms itself, which is not my problem - I’m fine with different slug in different languages - I’m just looking to keep my permalink symetry.

In case anyone has a link to a discussion or point me in the right direction, that would be nice.


site configuration

contentDir = 'content/en'
languageCode = 'en-US'
languageName = 'English'
weight = 1

contentDir = 'content/de'
languageCode = 'de-DE'
languageName = 'Deutsch'
weight = 2

categories = 'kategorien/:slug'

But the permalinks setting is applicable to regular pages, not list pages. So we also need to set the url on the list page:


title = 'Kategorien'
date = 2022-09-13T14:12:51-07:00
draft = false
url = 'kategorien'

Try it:

git clone --single-branch -b hugo-forum-topic-40498 hugo-forum-topic-40498
cd hugo-forum-topic-40498
hugo server

Including git repository for me to clone and test :eyes:

I’m speechless.

@jmooring Woow, thank you so much - again.

This is exactly working the way I was trying to achive it.

Looking at your code, I do understand how to bypass the default behaviour.
I wasn’t aware of the trick with the folder and the + frontmatter url property.

Really great.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.