What if Chinese characters are garbled in Wordpress English theme translation?

Source: Internet
Author: User
Tags php editor
Although the Chinese wordpress theme is already very good, there are many beautiful wordpress theme in English, and we always want to translate it into Chinese. Just like a wordpress q & a topic I found online a few days ago

Although the Chinese wordpress theme is already very good, there are many beautiful wordpress theme in English, and we always want to translate it into Chinese. Just like a wordpress q & a topic I found on the Internet a few days ago, because it was in English, it took a long time to complete Chinese conversion.

Speaking of translation of English themes, I have shared an article titled "How to convert wordpress English themes into Chinese themes". This document describes how to customize the theme in Chinese. However, a prerequisite for this wordpress Chinese tutorial is that the language pack must be included in the wordpress template. po and. the mo file is used. In fact, many netizens often reflect their downloaded wordpress themes in English. they cannot find the ages folder mentioned in the tutorial, that is, they do not have their own language packages. In this case, how can I translate English themes? I believe this article will help you solve your puzzles!

If no language pack is found, you cannot use the Poedit tool for translation. Instead, you can use the DW php Editor for direct translation, however, if you replace the English with the corresponding Chinese, Chinese garbled text may occur. In fact, Chinese garbled text is similar to the following two cases. here we will share with you how to solve wordpress Chinese garbled text.

1. modify the format of the saved file

Most of the time, we directly edit the php file and upload it to the server. when it is opened, Chinese characters may be garbled or the layout may be misplaced. this is generally because the default ANSI encoding format does not support Chinese characters, while although we know that should be saved as UTF-8 format, but because the UTF-8 format with BOM header and without BOM header, with BOM header UTF-8 format will be a problem, the UTF-8 saved with the notebook is with BOM header, so it is recommended that you use EditPlus to edit, and then select the UTF-8 format without bom header save!

II. use tools for transcoding

Because many times, the version character encoding used for UTF-8, so the need for such conversion, if it is GBK or GB2312, generally do not need to convert. There are many online UTF-8 conversion tools available for implementation. Just enter Chinese text in the text box and press convert to convert it to a UTF-8 character. When translating the English template, only first translate the English into Chinese, and then replace the Chinese with the converted UTF-8 characters, can also achieve direct translation, quite simple.

III. others

Of course, there may still be many things of wordpress Chinese garbled characters, but this is something I have encountered at the moment, and then solve it through these methods. if you have any better methods and suggestions, welcome to share and exchange!

Contributed by Yao Ming Web (http://www.yamaribbon.cn), reprinted when Please keep this link, thank you for your cooperation!

 

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.