Multilingual

Th' Relearrrn theme works wit' Hugo’s multilingual mode.

It supports many languages, includ'n right-to-left languages.

  • Arabic
  • Simplified Chinese
  • Traditional Chinese
  • Czech
  • Dutch
  • English
  • Finnish
  • French
  • German
  • Hindi
  • Hungarian
  • Indonesian
  • Italian
  • Japanese
  • Korean
  • Polish
  • Portuguese
  • Romanian
  • Russian
  • Spanish
  • Swahili
  • Turkish
  • Vietnamese

Translat'n by File Name

Here’s how t' make yer ship multilingual us'n translat'ns by file name:

  1. Set up languages 'n yer hugo.toml file:

    hugo.
    defaultContentLanguage = 'en'
    
    [languages]
      [languages.en]
        languageCode = 'en'
        languageName = 'English'
        title = 'My Website'
        weight = 1
    
      [languages.pir]
        languageCode = 'art-x-pir'
        languageDirect'n = 'rtl'
        languageName = 'Pirrratish'
        title = 'Arrr, my Website'
        weight = 2
    defaultContentLanguage: en
    languages:
      en:
        languageCode: en
        languageName: English
        title: My Website
        weight: 1
      pir:
        languageCode: art-x-pir
        languageDirect'n: rtl
        languageName: Pirrratish
        title: Arrr, my Website
        weight: 2
    {
       "defaultContentLanguage": "en",
       "languages": {
          "en": {
             "languageCode": "en",
             "languageName": "English",
             "title": "My Website",
             "weight": 1
          },
          "pir": {
             "languageCode": "art-x-pir",
             "languageDirection": "rtl",
             "languageName": "Pirrratish",
             "title": "Arrr, my Website",
             "weight": 2
          }
       }
    }
  2. Duplicate yer rrrambl'n files an' add language codes t' their file names:

    β”œβ”€β”€ rrrambl'n
    β”‚   β”œβ”€β”€ first-chapter
    β”‚   β”‚   β”œβ”€β”€ first-page
    |   |   |   β”œβ”€β”€ _index.en.md
    |   |   |   └── _index.pir.md
    β”‚   β”‚   β”œβ”€β”€ second-page
    |   |   |   β”œβ”€β”€ index.en.md
    |   |   |   └── index.pir.md
    β”‚   β”‚   β”œβ”€β”€ third-page.en.md
    β”‚   β”‚   └── third-page.pir.md
    β”‚   β”œβ”€β”€ _index.en.md
    β”‚   └── _index.pir.md
    β”œβ”€β”€ themes
    β”‚   └── hugo-theme-relearn
    β”‚       └── ...
    └── hugo.toml

Translat'n by Rrrambl'n Directory

Th' theme also support translat'ns by rrrambl'n directory which can be configured 'n a similar way. This be not used 'n further examples o' this documentat'n.

Search Sett'ns

Check th' search configurat'n fer multilingual opt'ns.

Turn Off Language Switch'n

Opt'n By default th' theme shows a language switcher 'n th' lower part o' th' menu.

T' dis'ble th' language switcher set disableLanguageSwitchingButton=true

hugo.
[params]
  disableLanguageSwitchingButton = true
params:
  disableLanguageSwitchingButton: true
{
   "params": {
      "disableLanguageSwitchingButton": true
   }
}