Open maaque opened 1 year ago
Hi @maaque, honestly I am not sure this theme supports i18n, I've only used it for single language sites. It can take some time before I get to look at it closer, but it's a good idea.
That would be really appreciated and BTW, many thanks for this great template
Any hints how multilanguage support could be implemented?
Probably simplest approach would be like content subfolders /de and /en with the content inside - but how would the top homepage need to look like?
@spi43984 see https://gohugo.io/functions/i18n/ I think we should stick to Hugo patterns when possible
@spi43984 see https://gohugo.io/functions/i18n/ I think we should stick to Hugo patterns when possible
I agree - I could try an help but would need some short instruction how hugo-scroll is set up and where to dig in.
With the exampleSite I tried
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true
[languages]
[languages.de]
contentDir = 'content/de'
disabled = false
languageCode = 'de-DE'
languageDirection = 'ltr'
languageName = 'Deutsch'
title = 'Projekt Dokumentation'
weight = 1
[languages.de.params]
subtitle = 'Referenz, Tutorials und Erklärungen'
[languages.en]
contentDir = 'content/en'
disabled = false
languageCode = 'en-US'
languageDirection = 'ltr'
languageName = 'English'
title = 'Project Documentation'
weight = 2
[languages.en.params]
subtitle = 'Reference, Tutorials, and Explanations'
with content/homepage copied into two directories content/de and content/en (that resulted in content/de/homepage and content/en/homepage).
I had to copy layouts/shortcodes into exampleSite/layouts. Then got rid of a similar error to Error: Error building site: "/home/content/impressum.de.md:13:1": failed to extract shortcode: template for shortcode "icon" not found
.
A page is not rendered though correctly, see only "Page Not Found" in browser. Need to dig in further.
any luck with Multi-Language support? Thank you.
any luck with Multi-Language support? Thank you.
not yet. Still need to work on that. Could need a little support...
@maaque @valsha @spi43984 multi-language support now being developed in #177, check the PR while the code is hot :)
Hm, what worked at Netlify doesn't work for Github pages, this will need some more fixing for exampleSite, but the feature is now available.
When I add multilanguage support in the config.toml like
[languages] [languages.de] title = "Test Deutsch" weight = 2
[languages.en] title = "Test English" weight = 1
and try to start the hugo server I get the error message:
Error: Error building site: "/home/content/impressum.de.md:13:1": failed to extract shortcode: template for shortcode "icon" not found
As soon as I remove the language section is works again. Any idea, what I am doing wrong?