Handling i18n in Directory based archetypes

Hi All,

I’m currently working on a new hugo theme to help in local tech community groups,see https://github.com/chrisreddington/hugo-community/ for more details.

In the exampleSite config, I have set a default language of en, leaving it open for a user to build upon the config and add their own languages. You’ll also notice on the Content/group or Content/event folder, I have added the .en.md extensions.

It’s been making me think (related to This GitHub Issue), what is the best way to handle i18n in archetypes when using the translation by filename approach?

Is there a way in the hugo new --kind command to pass in some kind of language extension, so that hugo can generate a filler language-code in the resulting md filenames? Or would the best approach be to document this within the theme, and ask the user to manually rename those files, based upon the language they’re looking for?

The alternative, is a “directory archetype” per language/per archetype, but I feel that would become unmanageable, so just trying to understand any tried and tested solutions :slight_smile: Thanks in advance!