I use the theme “Blowfish”. My Hugo website is bilingual, the primary language is German.
Instead of German, I want to use the language code “de-at” (which is Austrian German). But the language prefix should still be “de” instead of “de-at”.
What I did:
- In
config.tomlI set:
defaultContentLanguage = “de-at”
defaultContentLanguageInSubdir = true
- I renamed
languages.de.tomlandmenues.de.tomltolanguages.de-at.tomlandmenues.de-at.toml. - I copied the file
/themes/blowfish/i18n/de.yaml, pasted it to/i18n/, and renamed it tode-at.yaml.
What I tried to achieve:
Hugo should use the language code “de-at” (it’s slightly different from “de”).
The main URL of my website should still use the language prefix “de”.
Current status:
Hugo uses the language code “de-at”.
The URL, however, is example.com/de-at.
I was able to force the language prefix for sections. For example, in /content/de/blog/_index.md I included url: "/de/blog/", so now the section URL is example.com/de/blog. Still, I can’t change the prefix for the front page or for individual permalinks.
What can I do?