thegeeklab / hugo-geekblog

Hugo theme made for blogs
https://hugo-geekblog.geekdocs.de
MIT License
98 stars 41 forks source link

Multilingual support #23

Open pmviva opened 3 years ago

pmviva commented 3 years ago

Hi, I was wondering if there was a plan for implementing multilingual support in the theme. I thnk it should be fairly straightfoward to implement it. If you like the idea I can fork the repository and submit a pull request.

I was thinking the following: 1) Add buttons for all the available languages in the site using {{ range .Site.Home.Translations }}} in the main menu 2) Ensure using {{ .Permalink }} on every page and using relLangURLor absLangURLon every link 3) Adding links for translations similar to tags on every post. 4) Move and translate every hardcoded text in the templates to i18n files. 5) Configure params per language inside config.toml, specially site title, subtitle, date formats, etc. 6) Add <link rel="alternate" href="......" hreflang="..."/>in HTML Head

Let me know.

Thanks Pablo

xoxys commented 3 years ago

Hi thanks for your report. In general adding multilingual support was planned, but I didn't find the time yet to work on it. So if you want to start working on it, I would be happy to review your PR and help if needed :) Right now I'm not quite sure how to handle 1. and 3. but that's more a design question, and we can discuss this later.

pmviva commented 3 years ago

Hi Robert, I dont have much spare time the following weeks but I will fork the repo and start working in a feature branch implementing i18n. I'll submit a PR when I have something ready to preview.

toheine commented 1 year ago

Hi, I just stumbled across this issue. I wonder if there are still plans to implement multilang support. That would be excellent. Thanks for a short answer.

xoxys commented 1 year ago

Hi, yes, I would still like to have it in the theme. As I'm working on other projects, PRs are very welcome.