HBS suppports multiple languages out of box, such as English, Simplified Chinese, Traditional Chinese, French, Russian etc.

Supported Languages#

Language Code
English en
Simplified Chinese zh-hans(Recommended), zh-cn
Traditional Chinese zh-hant(Recommended), zh-tw, zh-hk
Arabic ar
German de
French fr
Indonesian id
Japanese ja
Polish pl
Portuguese pt
Russian ru
Ukrainian uk
Uzbek uz

Configuration#

[ar]
  languageDirection = 'rtl'
  title = 'مدونتي'
  weight = 3
[en]
  languageName = 'English'
  weight = 1
[zh-hans]
  languageName = '简体中文'
  weight = 2
  [zh-hans.params]
    description = '一个快速、响应式和功能丰富的 Hugo 博客主题'
    keywords = 'Hugo, Bootstrap, 博客主题'
ar:
  languageDirection: rtl
  title: مدونتي
  weight: 3
en:
  languageName: English
  weight: 1
zh-hans:
  languageName: 简体中文
  params:
    description: 一个快速、响应式和功能丰富的 Hugo 博客主题
    keywords: Hugo, Bootstrap, 博客主题
  weight: 2
{
   "ar": {
      "languageDirection": "rtl",
      "title": "مدونتي",
      "weight": 3
   },
   "en": {
      "languageName": "English",
      "weight": 1
   },
   "zh-hans": {
      "languageName": "简体中文",
      "params": {
         "description": "一个快速、响应式和功能丰富的 Hugo 博客主题",
         "keywords": "Hugo, Bootstrap, 博客主题"
      },
      "weight": 2
   }
}

You’ll need to specify the languageDirection as rtl for Right-to-left writing languages.

See also Hugo Multilingual.

Localization#

The dateFormat supports localization, you can change it as :date_full, you can find more layouts in Date/time formatting layouts.

Please note that the zh-cn, zh-tw and zh-hk are not supported, since the language code could not match the locales defined in Hugo Locales.

Further Reading#