Extension:UnihanTag

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
UnihanTag

Release status: beta

Implementation Tag
Description Extension tag for adding data about Chinese characters.
Author(s) Kenny Root (kRutOn)
Last version 1.0.0
MediaWiki 1.6.x or higher
License GPLv3
Download UnihanTag.php

Check usage (experimental)

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.

[edit] Installation

  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');

[edit] Usage

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

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

This results in:

老师 (Pinyin: lǎo shī)


Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox