gokarna-theme / gokarna-hugo

A minimal opinionated theme for Hugo
https://gokarna-hugo.netlify.app
GNU General Public License v3.0
357 stars 139 forks source link

Multi-langage #257

Closed slallemand closed 3 days ago

slallemand commented 3 days ago

Hi, Is there a way to switch from one langage to another ? I would like to have a flag to switch easily for example.

Thanks

jamesericdavidson commented 3 days ago

These links may help; @pkierski has already contributed some i8n strings (#239, #240).

https://gohugo.io/content-management/multilingual/

https://gohugo.io/functions/lang/translate/

slallemand commented 3 days ago

In fact I was looking for a configuration option in the theme to automaticaly add shortcuts to translated content. Finally, I just add a few entries in my menu configuration :

    menu:
      main:
...
        - identifier: fr
          name: 🇫🇷
          url: /fr/
          weight: 4
        - identifier: en
          name: 🇬🇧
          url: /en/
          weight: 5