Example: (Simplified> Traditional)Bread> Bread(zh-tw)Laos> Laos(zh-hk)China Life> China Life(zh-hk)Ronaldo> Ronaldo(zh-hk)( Traditional > Simplified) Memory > Memory (zh-cn) Bush > Bush (zh-cn) Database > Database (zh-cn) usage
1. Download MediaWiki: (http:// www.jb51.net/codes/25190.html), decompress in the path such as: /var/lib/mediawiki-1.13.3
2. Download mediawiki-zhconverter (the above file has been integrated), decompress And copy 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 "); The optional values for the conversion target are zh, zh-cn, zh-tw, zh-sg, zh-hk*/echo MediaWikiZhConverter::convert("bread", "zh-tw");echo MediaWikiZhConverter::convert ("memory", "zh-cn");echo MediaWikiZhConverter::convert("Ronaldo", "zh-hk");5. Complete
Supported versions
The following MediaWiki versions have been confirmed to work 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 , please use PHP5 version.
Package download address http://xiazai.jb51.nethttp://www.jb51.net/codes/25190.html