Hi Matt,
I don't have an example ready in a course, but I do have one in an
HTML based presentation.
https://hastexo.github.io/ceph-intro/
Now if you change that URL to:
http://hastexo.github.io/ceph-intro/?lang=de
... then you'll get a version in German.
The ?lang=de magic is just from this little JavaScript snippet:
<script src="//
cdn.localizejs.com/localize.js"></script>
<script type="text/javascript">
// get target language from location string
// add ?lang=de to URL for German
var langMatch = window.location.search.match('lang=\([a-z]{2}\)');
var targetLang = (langMatch) ? langMatch[1] : 'en'
Localize.initialize({
key: <key>,
sourceLanguage: 'en',
targetLanguage: targetLang,
saveNewPhrases: true,
translateBody: true
});
</script>
So you could do that using whichever logic you want to apply, say for
example with the Accept-Language header or whatever. Take a look at
https://help.localizejs.com/docs/detecting-language-of-a-visitor for
further information.
As for how you'd maintain the content blocks, yes HTML would be the
most straightforward option. But maybe there are other ways to include
this as well. Perhaps you can cleverly include this from a Google
Slides presentation, for example — haven't tried that.
Please let me know if that information is helpful. Thank you!
Cheers,
Florian