gokarna-theme / gokarna-hugo

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

Multi-langage #257

Closed slallemand closed 1 month ago

slallemand commented 1 month 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 1 month 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 1 month 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