Extension:UnihanTag
Appearance
From mediawiki.org
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+ |
| Licence | GNU General Public License 3.0 or later |
| Download | UnihanTag.php |
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
- Download UnihanTag.php and makedbm.pl and place them under $IP/extensions/UnihanTag/
- Note: $IP is your MediaWiki install directory.
- Download Unihan database Unihan.txt and put it under $IP/extensions/UnihanTag
- Convert the Unihan text file into a CDB with:
- perl makedbm.pl
- Enable the extension by adding this line to your LocalSettings.php :
require_once('extensions/UnihanTag/UnihanTag.php');
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ī)