Good day,
I am trying to build a multilingual website and part of the process is to also translate the taxonomies. All is well until I encountered a roadblock with taxonomy URLs.
[Solved] In our local language, we add the word “mga” to make a word “plural”. Using “tags” as an example, it would be: mga tag.
[Solved] I have this in my config file: tag = "mga tag"
. Since taxonomies are using the plural form as its default slug, the two-word format generates a space and results in a 404 error even though there is content with "mga tag" = ["sometag"]
frontmatter.
[Solved] There are two ways I am thinking of solving this but I can’t find a way to do it.
By adding a slug to a taxonomy. In the example, I can set it tomga-tag
.Create a translation of the taxonomies through the i18n method. Then let the system detect if it should display/lang_code/tag/tag_name/
or/tag/tag_name/
?
Update for above: It appeared that it’s in the theme. After changing to absLangURL
and adding urlize
where needed, it worked fine.
Edit: Now I only have to figure this last part. (Apologies, first time with GoLang.)
In addition to the above, the theme I am using–Clarity–have this {{ range .Site.Taxonomies.tags.featured }}
for its “Featured Post” feature. Since the plural form of the translated taxonomies have two words, I can’t use it to display Featured Post in the translated website.
Thank you.
Hugo Static Site Generator v0.74.2-48565DE6/extended linux/amd64 BuildDate: 2020-07-17T17:32:27Z
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.14.3"