Do all page bundles need localized copies once you add a new language?

@mdonohue

Thanks to @bep’s work over the weekend, using mounts to fill in missing translations now works with two or more languages.

Notes:

1) The functionality will be available in the next release. Or, if you can build from source, it’s available now.

2) In site configuration, you can configure all your language mounts first, then configure the overrides. For example:

config.toml
#------------------------------------------------------------------------------
# Languages
#------------------------------------------------------------------------------

[languages.en]
languageName = 'English'
weight = 1

[languages.de]
languageName = 'Deutsch'
weight = 2

[languages.nl]
languageName = 'Nederlands'
weight = 3

#------------------------------------------------------------------------------
# Content mounts
#------------------------------------------------------------------------------

# EN content
[[module.mounts]]
source = 'content/en'
target = 'content'
lang = 'en'

# DE content
[[module.mounts]]
source = 'content/de'
target = 'content'
lang = 'de'

# NL content
[[module.mounts]]
source = 'content/nl'
target = 'content'
lang = 'nl'

#------------------------------------------------------------------------------
# Fill in the missing translations
#------------------------------------------------------------------------------

# This fills in the gaps in DE content with EN content
[[module.mounts]]
source = 'content/en'
target = 'content'
lang = 'de'

# This fills in the gaps in NL content with EN content.
[[module.mounts]]
source = 'content/en'
target = 'content'
lang = 'nl'

3) I have pushed changes to the test site we’ve been working with. It now includes a fourth language (es, without a content directory). Please take it for a spin once you have updated or compiled Hugo.

git clone --single-branch -b hugo-forum-topic-37225 https://github.com/jmooring/hugo-testing hugo-forum-topic-37225
cd hugo-forum-topic-37225
hugo server
10 Likes