These two days make a website with WordPress, choose the Zerif-lite theme, and enable its sub-theme responsiveboat.
The site language of the website is set to "Simplified Chinese". Discover whether the Web page is displayed or English. For example, the bottom of latest news "READ full article".
Check the wp-conten/languages/themes/. There are already language packs Responsiveboat-zh_cn.mo and Responsiveboat-zh_cn.po
In fact, the language pack does not automatically load correctly.
Some of the solutions are as follows:
1, change the code--wp-content/themes/responsiveboat/functions.php file Add the following code:
Add_action (' After_setup_theme ', ' My_theme_setup '); function My_theme_setup () { load_theme_textdomain(' Responsiveboat ', get_template_directory (). '/languages ');}
2, wp-content/themes/responsiveboat/under a new languages directory, and put wp-conten/languages/themes/under the Responsiveboat-zh_ Cn.mo and Responsiveboat-zh_cn.po are copied and renamed Zh_cn.mo and Zh_cn.po respectively.
Refresh the page and the page appears in Chinese. For example, "Read full article" becomes the "reading".
Get!
Reference article: let WordPress theme Support language localization
WordPress Theme Enable localized language pack