hugo-geekblog icon indicating copy to clipboard operation
hugo-geekblog copied to clipboard

Multilingual support

Open pmviva opened this issue 4 years ago • 4 comments

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

pmviva avatar Jan 15 '21 21:01 pmviva

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.

xoxys avatar Jan 18 '21 15:01 xoxys

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.

pmviva avatar Jan 18 '21 15:01 pmviva

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.

toheine avatar Sep 15 '23 17:09 toheine

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

xoxys avatar Sep 17 '23 21:09 xoxys