This is the 14th day of my participation in the August More Text Challenge

The default menu, article information and site information in the Next interface are named in English. This article introduces how to translate these English names into Chinese.

The preparatory work

Set the Site configuration information. The language value of the Site is zh-Hans, Hexo – Site information configuration.

Configuring translation files

In/hexo_root/themes/next/languages/folder to create useful – Hans. Yml file

  • Translate the menu
menu:
  home: Home page
  archives: The archive
  categories: classification
  tags: The label
  about: about
  search: search
  commonweal: The public in 404
  something: Have a material
Copy the code
  • Translate the title of the article
post:
  posted: Published in
  edited: Edit the
  in: category
  views: Read the number
Copy the code
  • Translation sidebar
sidebar:
  toc: The article directories
  overview: Station in the overview
Copy the code
  • Translate site status
state:
  posts: The log
  categories: classification
  tags: The label
Copy the code
  • Translated articles read times
post:
  views: Read the number
Copy the code
  • Translate the reading time and the number of words in the text
symbols_count_time:
  time: The reading time
  count: In this paper, word
  count_total: Total site word count
  time_total: Site reading duration
Copy the code
  • Translate footer entries
footer:
  theme: Theme plan
  powered: Technical support
Copy the code

At this point the corresponding content will be translated into the set text