Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-language support #119

Open
maaque opened this issue Mar 25, 2023 · 10 comments · Fixed by #177
Open

Multi-language support #119

maaque opened this issue Mar 25, 2023 · 10 comments · Fixed by #177
Assignees
Milestone

Comments

@maaque
Copy link

maaque commented Mar 25, 2023

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?

@zjedi
Copy link
Owner

zjedi commented Mar 25, 2023

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.

@maaque
Copy link
Author

maaque commented Mar 26, 2023

That would be really appreciated and BTW, many thanks for this great template

@spi43984
Copy link
Contributor

spi43984 commented Sep 28, 2023

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?

@zjedi
Copy link
Owner

zjedi commented Sep 30, 2023

@spi43984 see https://gohugo.io/functions/i18n/
I think we should stick to Hugo patterns when possible

@spi43984
Copy link
Contributor

spi43984 commented Oct 1, 2023

@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.

@spi43984
Copy link
Contributor

spi43984 commented Oct 15, 2023

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.

@valsha
Copy link

valsha commented Oct 18, 2023

any luck with Multi-Language support?
Thank you.

@spi43984
Copy link
Contributor

any luck with Multi-Language support? Thank you.

not yet. Still need to work on that. Could need a little support...

@zjedi zjedi added this to the v2.0 milestone Mar 17, 2024
@zjedi zjedi self-assigned this Mar 24, 2024
@zjedi zjedi pinned this issue Apr 1, 2024
@zjedi zjedi changed the title Add Multi Language support Multi-language support Apr 1, 2024
@zjedi
Copy link
Owner

zjedi commented May 11, 2024

@maaque @valsha @spi43984 multi-language support now being developed in #177, check the PR while the code is hot :)

@zjedi zjedi linked a pull request May 12, 2024 that will close this issue
@zjedi zjedi reopened this May 19, 2024
@zjedi
Copy link
Owner

zjedi commented May 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants