Jump to content

扩展:Numbertext

From mediawiki.org
This page is a translated version of the page Extension:Numbertext and the translation is 42% complete.
MediaWiki扩展手册
Numbertext
发行状态: 不再維護
实现 解析器函数
描述 允许将数字转化为字符
作者 Pavel Astakhov (Pastakhov留言)
最新版本 0.10.0 (2014-04-01)
MediaWiki
PHP 5.3+
数据库更改
许可协议 LGPL/BSD dual-license
下載
示例 test.foxway.org

  • $wgNumbertext_defaultLang
  • $wgNumbertextLang
季度下載量 2 (Ranked 134th)
前往translatewiki.net翻譯Numbertext扩展

The Numbertext extension allows to transform numbers into words. It based on the numbertext.org service and supports more than thirty languages.

用法

  • {{#numbertext:number|language}}
  • {{#moneytext:number|currency|language}}

位于:

  1. number - the number to transform into words
  1. currency - currency of money (sample: "USD", "EUR", "RUB", etc)
  1. language - language for transform (optional, sample "en", "en_US", "ru", "ru_RU", etc)

Default language sets by variable $wgNumbertext_defaultLang, which by default equally $wgLanguageCode (see Site language).

You can specify a different default language, or an empty string, and will use the language specified in the user preferences.

安裝

  • 下载文件,并将解压后的Numbertext文件夹移动到extensions/目录中。
    开发者和代码贡献人员应从Git安装扩展,输入:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Numbertext
  • 将下列代码放置在您的LocalSettings.php 的底部:
    require_once "$IP/extensions/Numbertext/Numbertext.php";
    
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。