Hi again. I just noticed that the URL generated by translated taxonomies does not include the language folder as defined in the config.toml file.
In config.toml
:
[language.lang_code.taxonomies]
kategorya = "mga kategorya"
tag = "mga tag"
In /content/en/categories/cat1/_index.md
+++
title = "Cat1"
aliases = ["category1"]
slug = "cat1"
translationKey = "cat1"
+++
In /content/fil/mga-kategorya/kat1/_index.md
+++
title = "Kat1"
aliases = ["kategorya1"]
slug = "kat1"
translationKey = "cat1"
+++
Once generated, the taxonomy links are as follows:
In the default en
language:
- Generated: domain.tld/categories/cat1/content.md
In the fil
language:
- Generated: domain.tld/mga%20kategorya/kat1/content.md == 404 error
- Should be: domain.tld/fil/mga%20kategorya/kat1/content.md
Did I misunderstand how to use _index.md
? Or is this a bug?
The workaround I found was to create a redirect alias. But in security-oriented browsers like Firefox, HTML redirect is blocked by default, the end-user have to click “Allow”–which confuses most visitors, so it’s preferable to avoid this workaround.
If taxonomies can be translated via config file but it’s not taking the /lang/ folder in its path during generation, how do we use translated taxonomies? I’m thinking I misunderstood something somewhere.
Thank you again.
EDIT:
Another unfortunate thing about the workaround I mentioned above, one has to add a redirect alias for every new term.