I’m working with a large website and trying to learn what a good pattern could be to support “overlay localization” - by that, I mean we have the main content for our site in english (and it gets frequent updates), and we would like to also support translated content (chinese). Ideally I would like to find a example/scheme where if the content was available in chinese it would be provided, but if not available (and chinese was “desired” - not sure if that means URI changes, etc) the english content could be displayed with a note that this page/content has not yet been translated.
The content is broad-reaching and diverse, so not really very appropriate to stuff into strings files for classic localization efforts.
Has anyone enabled dual-language sites with Hugo and have some patterns they are willing to share on how to achieve this kind of “overlay” setup with multiple languages?
If you have English as the default language, and add a file with the language suffix where the page has been translated, you can then show/hide a menu link depending upon translation availability.
In the site I just launched an hour ago, last month was all about using these functions to add English. In my case, all the pages are translated, but, it does work to not have a translated page, I noticed.
What you currently can possibly do is to start from the language you know have all translations, and create a nested loop. But that gets complicated pretty fast (when you have content in Chinese, but not in English).
I have created this issue to create a simpler way: