Multilingual archetypes

I worked with this for a while and, as nearly as I can determine, it’s controlled by your config file’s DefaultContentLanguage setting.

With it set at sr, as you had it, hugo new blog/test-post.md --kind sr/blog creates content/sr/blog/test-post.md. But if that setting is either changed to en or commented-out (which invokes the default setting of en), hugo new blog/test-post.md --kind sr/blog creates content/en/blog/test-post.md — in other words, the --kind sets only which archetype it uses but does not change the final language-specific subdirectory within content/; instead, the DefaultContentLanguage setting does. That does make sense, but the documentation doesn’t explain it.

(You’ll definitely want to use the --kind flag because, otherwise, Hugo uses only the default.md archetype from either theme/[YourTheme]/archetypes/sr/ or theme/[YourTheme]/archetypes/en/, depending on how DefaultContentLanguage is set in the config file.)

Anyway, it appears that, while creating your content from archetypes, you’ll need to switch back and forth on that DefaultConfigLanguage setting. Sorry that I can’t offer a more convenient answer.

You may also want to read this old question from years ago:

1 Like