Multi Language

To enable/disable the multi language button in the footer, edit the parameter enableLangChange in params.toml. The default language of this theme is English. If you want to use another language, follow these steps

  1. Make a menu file.

    root
    โ”œโ”€โ”€ config
    โ”‚ย ย  โ”œโ”€โ”€ _default
    โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ ...
    โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ menus.ko.toml
    
     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    
    [[main]]
      identifier = "about"
      name = "about"
      url = "/about/"
      weight = 1
    
    [[main]]
        identifier = "archive"
        name = "archive"
        url = "/archive/"
        weight = 2
    ...
    
  2. Make a language-code folder. Then make a content file.

    root/content/ko/markdown-syntax.md
    root/content/ko/hugo-blog.md
    ...
    

    I made a ko folder in the content folder. In that way, we can easily organize our content by language.

  3. Make an i18n file.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    
    [search-placeholder]
    other = "๊ฒ€์ƒ‰..."
    
    [summary-dateformat]
    other = "2006๋…„ 01์›” 02์ผ"
    
    [tags]
    other = "ํƒœ๊ทธ"
    ...
    

    We already have some i18n files. If there is your language among them, this process can be omitted.

    • en
    • eo
    • fa
    • fr
    • ko
    • zh
  4. Edit config.toml file.

    1
    2
    3
    
    defaultContentLanguage = "ko"
    defaultContentLanguageInSubdir = true
    hasCJKLanguage = true