Problem specifying language + region


#1

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!)


#2

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


#4

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.


#5

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