Translating taxonomies

I am creating a spanish blog.

It is going to be categorized in sections (sports, hobbies…) and categories and using tags.

But I would like to display categories and tags int spanish (categorias and deportes).

I have created categories and tags in spanish in the config.toml like this:

[taxonomies]
categoria= “Categorias”
etiqueta= “Etiquetas”
serie= “Series”

So the slug for tags would be /etiquetas/xxxx instead of /tags/xxxx

But I don’t know it it is a good idea.

It seems that many themes take for granted that your tags taxonomy is named tags.

Is there a way to maintaing the taxonomies (tags, and categories) but translate the display name?

Is it commong to rename the base taxonomies to other names?
Do most of the themes deal with other taxonomy names?

I am using ananke theme now, and I am not sure it works well with other tasonomies than the standard ones.

It’s fine. Hugo does not care about how you name taxonomies, tags and categories are just conventions. You can call them anything you like.

No. You can have different taxonomies per language version. Therefore if you have a taxonomy called categorias in Spanish you need to define a categories taxonomy in English and assign it in the respective content files manually.

1 Like

I have adding this settings in config.toml
[permalinks]
categories = “/категория/:slug/”
tags = “/тэг/:slug/”
pages = “/:slug/”

Add now assign tags & categories to the content files using Russian lang
image

And links works fine!

1 Like

Thank you both very much for the answers.

Yes it works, I have been making some tests.

I needed to define the permalinks to get them working.

The only concern is that I translate tags to other taxonomy name (etiquetas) some themes may not work properly.
Some of them seem to have hardcoded references to tags taxonomy in their code.

I am trying Academic now, it seems to work OK when I use custom taxonomies.

But I have seen a tags.html in its layouts directory (layouts\partials\tags.html) that has hardcoded tags taxonomy references in it.

May be it is there for backwards compatibility as it seems to work.

But other themes seem to depend deeply in tags taxonomy with hardcoded values.

Are these obsolete themes?