Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of making WordPress topic language Pack

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

How to make WordPress theme language Pack? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

How to make WordPress theme language Pack (Chinese theme)

After the production of this yHtml5 theme, I learned how to make a language pack for the theme, which is a general Chinese theme. Friends who need it can understand, don't talk too much nonsense, look at the steps.

First of all, you need to use poedit, the official download address of http://www.poedit.net/download.php.

Second, create a new languages folder under the theme directory, where you will save the language pack.

Third, open poedit and create a new message directory document

Create a new message directory document

Fourth, configure the path, keywords, this step is very critical, I did not understand before, tossed about all night.

Just fill in the engineering information according to your own.

Configuration path

I studied a lot, searched a lot of answers, and finally concluded that if you set up the languages directory like this, then this path only needs to add ".." Two o'clock is fine, and then it's best to save it as zh_CN.po (the theme will be detected based on localization).

Configure keywords

Configure keyword this step, generally only need "_" (double underscore, note, is double underscore), "_ e" can be, the other two can also be added for a rainy day.

Fifth, this step requires the representation of all the documents in the theme that need to be translated.

This is how I understand these two functions, which are generally used for separate English output; for example:

The code is as follows:

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report