Internationalization

Choosing Language

Edit Hexo config file, set the value of language to the language you need. For example, English looks like this:

Hexo config file
language: en

NexT now supports following languages:

LanguageExampleCode
Arabicعربيar
Bengaliবাংলাbn
Chinese (Simplified)简体中文zh-CN
Chinese (Traditional)繁體中文zh-TW
Chinese (Hong Kong)繁體中文-香港zh-HK
DutchNiederländischnl
EnglishEnglishen
FrenchFrançaisfr
GermanDeutschde
IndonesianIndonesiaid
ItalianItalianoit
Japanese日本語ja
Korean한국어ko
Persianفارسیfa
PortuguesePortuguêspt
Portuguese (Brazilian)Português (Brazilian)pt-BR
RussianРусскийru
Sinhalaසිංහලsi
SpanishEspañoles
TurkishTürktr
TurkmenTürkmençetk
UkrainianУкраїнськийuk
VietnameseTiếng Việtvi

The files in the language directory are automatically generated, you do not need to modify them directly. Please submit translations via Crowdin if you would like to add or improve translation for NexT theme.

Multilingual Switcher

Set multiple languages in Hexo config file, e.g.

Hexo config file
language:
- zh-CN
- en

Then turn on language_switcher in NexT config file:

NexT config file
# Show multilingual switcher in footer.
language_switcher: true

Override Default Translations

If you would like to customize the default translation, you do not need to modify the translation files in the languages directory. You can override all translations using Data Files.

  1. Creat a languages.yml in source/_data.

  2. Insert following codes: (be careful about the two-space indent)

    languages.yml
    # language
    zh-CN:
    # items
    post:
    copyright:
    # the translation you perfer
    author: 本文博主
    en:
    menu:
    schedule: Calendar

This situation is also available for off-list items. For example, Next uses Theme Inject to introduce the commments systems. You can rename the returned value in chinese as followed:

languages.yml
# language
zh-CN:
# items
post:
comments:
disqus: 评论