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 phpProgramMedium
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