Automating Language Translations in Hugo: Any Solutions?

Hello, everyone!

In the world of automation, it doesn’t make sense to create individual .md files for each language which takes for ever as you increase the number of languages.

So, I’m wondering if anyone has found a way to make it easier. Can Hugo somehow take the /en directory and make directories for other languages using tools like Google Translate?

If you know of a solution or have thoughts on this, please share. It could save time and make multilingual content in Hugo much simpler.

Thank you.

Not sure if lang.Merge helps.

You can also translate (DeepL or others translate APIs) your content within your workflow (e.g. GitHub action) when pushing, and then trigger a re-build workflow if changes detected.

Hi @razon

The lang merger is a fallback for example if I have for example

# content/en
about.md 
contact.md

# content/fr
about.md

Hugo will show the contact page in English in the French version of website instead of saying page doesn’t exist etc.

I have to made a website with 9 languages and have around 300+ pages and it is very time-consuming to generate .md files for each language version.

So, I am wondering if someone have a better more automated solution using machine translation to generate the required content for each language.

translating i18n files are very easy but the content directory is very time consuming. hopefully there is a better way then doing it all manual. Just need Hugo to generate these translated files once.

Thanks

Anybody? who have a working solution for this? thanks

This is not a Hugo issue. So, perhaps posting on StackOverflow or Reddit might help. For example.

1 Like