Hi everyone.
First of all I’d like to thank you for the great work you’re doing with Hugo.
We’re currently working on a big redesign and recode of one of the websites that’s already showcased in the Hugo Gallery.
We’re using another technology stack atop of Hugo which includes Docker, Pug templates, Less and a lot of custom code to make the Hugo experience easier for us and also allow us to extend it’s functionality without depending completely on Hugo’s development.
However we’ve been relying completely on Hugo for providing the i18n support, and it seems we’ve hit a wall.
We’ve been trying to find ways to use country-codes instead of language codes for the i18n system, e.g: DK instead of DA.
That means we’re trying to get something like:
- https://www.apple.com/dk/ <- Unsupported by Hugo
instead of:
- https://www.apple.com/da/ <- Supported very well
But as soon as we try to use ‘dk’ in the config file, and create the dk.yaml file in the i18n folder, we get the following error:
>> Error: Error building site: Failed to load translations in file "dk.yaml": no language found in "dk.yaml" >> Exited with code: 255. >> Error executing child process: Error: Process exited with code 255.
Now there’s a possibility that it’s all related to how https://github.com/nicksnyder/go-i18n works , but we’d just like to know the status, if it’s a known bug or if we’re doing something wrong…
One of the solutions that comes up in my mind is to move the translations in the data/ folder, like we’ve did before the v0.17 release, and just index them through the templates, but that might be quite a hassle, especially when switching between languages and when it comes to creating the paths manually for each .md file…
Can’t wait to hear your thoughts…
Thanks again.
thank you for the fast reply!
