PHP Chinese Simplified and traditional code transfer perfectly supports Mainland China, Hong Kong, Taiwan and Singapore

Source: Internet
Author: User
Tags mediawiki

Example: (simplified> traditional) bread> zh-tw country> zh-hk China Life> zh-hk) ronaldo> ranate (zh-hk) (traditional> computing) memory> memory (zh-cn) boushu> bush (zh-cn) materials> database (zh-cn) Usage
1. Download MediaWiki: (http://www.jb51.net/codes/25190.html), unzip it in the path such as:/var/lib/mediawiki-1.13.3

2. Download mediawiki-zhconverter (the above file has been integrated), decompress and copy the mediawiki-zhconverter.inc.php to your PHP Program

3. Set the MediaWiki path in your program and reference mediawiki-zhconverter

Define ("MEDIAWIKI_PATH", "/var/lib/mediawiki-1.14.0/"); require_once "mediawiki-zhconverter.inc.php"; 4. Make the conversion

/* MediaWikiZhConverter: convert ("Word", "conversion target"); optional values of conversion target are zh, zh-cn, zh-tw, zh-sg, zh-hk */echo MediaWikiZhConverter: convert ("Bread", "zh-tw"); echo MediaWikiZhConverter: convert (" ", "zh-cn"); echo MediaWikiZhConverter: convert ("Ronaldo", "zh-hk"); 5. complete

Supported versions
The following MediaWiki versions are proven to be compatible with this program (http://download.wikimedia.org/mediawiki ):

PHP4: 1.6.10, 1.6.11
PHP5: 1.12.0, 1.13.3
If not necessary, use PHP5.

Packaging http://xiazai.jb51.nethttp: // www.jb51.net/codes/25190.html

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.