Code Monkey home page Code Monkey logo

mediawiki-zhconverter's Introduction

簡介

利用MediaWiki 作中文互換,支援不同地方中文用字上的分別(大陸、香港、台灣及新加坡)。

例子:

(簡 > 繁)

面包 > 麵包 (zh-tw)
寮国 > 老撾 (zh-hk)
**人寿 > 中國人壽 (zh-hk)
罗纳尔多 > 朗拿度 (zh-hk)

(繁 > 簡)

記憶體 > 内存 (zh-cn)
布殊 > 布什 (zh-cn)
資料庫 > 数据库(zh-cn)

使用方法

  1. 下載 MediaWiki: http://www.mediawiki.org/wiki/MediaWiki

  2. 解壓在路徑如:/var/lib/mediawiki-1.13.3

  3. 下載 mediawiki-zhconverter,解壓及把 mediawiki-zhconverter.inc.php 抄到你 PHP 程序當中

  4. 在你的程序中設定 MediaWiki 路徑, 及引用 mediawiki-zhconverter

     define("MEDIAWIKI_PATH", "/var/lib/mediawiki-1.6.10/");
     require_once "mediawiki-zhconverter.inc.php";
    
  5. 作出轉換

     /*
         MediaWikiZhConverter::convert( "字詞", "轉換目標");  
         轉換目標 = zh, zh-cn, zh-tw, zh-sg, zh-hk
     */
     
     echo MediaWikiZhConverter::convert("面包", "zh-tw");
     echo MediaWikiZhConverter::convert("記憶體", "zh-cn");
     echo MediaWikiZhConverter::convert("罗纳尔多", "zh-hk");
    
  6. 完成


支援版本

下列MediaWiki 版本已證實可以兼容本程式 http://download.wikimedia.org/mediawiki

  • PHP4: 1.6.10, 1.6.11
  • PHP5: 1.12.0, 1.13.3, 1.15.4

如非必要,請使用 PHP5 版本。


許可證

Copyright (C) 2011 tszming ([email protected])

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

mediawiki-zhconverter's People

Contributors

tszming avatar zverik avatar cornguo avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.