WordPress Theme Enable localized language pack

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.