Extension:UnihanTag

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
UnihanTag
Release status: beta
Implementation Tag
Description Extension tag for adding data about Chinese characters.
Author(s) Kenny Root (kRutOn)
Latest version 1.0.0
MediaWiki 1.6+
License GNU General Public License 3.0 or later
Download UnihanTag.php
Translate the UnihanTag extension if it is available at translatewiki.net
Check usage and version matrix.

This extension allows users to add data from the Unicode Han Database to Mediawiki pages without typing in the data manually. This includes Mandarin Pinyin and Cantonese Jyutping.

Project Homepage
UnihanTag Extension - the-b.org
Source Code
UnihanTag.php
Licensing
UnihanTag is released under GNU General Public License V3.

Installation[edit]

  1. Download UnihanTag.php and makedbm.pl and place them under $IP/extensions/UnihanTag/
    Note: $IP is your MediaWiki install directory.
  2. Download Unihan database Unihan.txt and put it under $IP/extensions/UnihanTag
  3. Convert the Unihan text file into a CDB with:
    perl makedbm.pl
  4. Enable the extension by adding this line to your LocalSettings.php :
require_once('extensions/UnihanTag/UnihanTag.php');

Usage[edit]

You can utilize UnihanTag by adding the <unihan> tag to articles:

<unihan add="mandarin" contours="yes">老师</unihan>

This results in:

老师 (Pinyin: lǎo shī)