Problem specifying language + region

I’m looking at using Hugo for some documentation that is translated into several languages, including Chinese and Portuguese (Brazil). However, I can’t for the life of me figure out how to specify a language together with a region variant in my site’s config.toml.

I’ve tried every variant I can think of:

[languages.br]
[languages.pt]
[languages.pt-br]
[languages.pt-BR]
[languages.pt.BR]
[languages.pt.br]

together with corresponding variants on the source filenames.

So far nothing has worked and I can’t find a definitive guide for these languages anywhere (I really have searched, so if it’s somewhere obvious, I can only apologise!)

This is potentially a really significant issue for my organisation in adopting Hugo. Does anyone have any thoughts or suggestions?

I assume this is going to be fixed in

https://github.com/gohugoio/hugo/issues/3564

This is already fixed in the i8n library we use and a fix is “on its way into Hugo”. Follow the issue to read more.

Thanks - I haven’t done any more Hugo development recently, but I’ll test the fix when I get a chance.