扩展:Numbertext

This page is a translated version of the page Extension:Numbertext and the translation is 42% complete.
MediaWiki扩展手冊
OOjs UI icon advanced-invert.svg
Numbertext
發布狀態: 未維護
实现 解析器函数
描述 允许将数字转化为字符
作者 Pavel Astakhov (Pastakhov讨论)
最新版本 0.10.0 (2014-04-01)
MediaWiki
PHP 5.3+
数据庫更改
许可协议 LGPL/BSD dual-license
下載
示例 test.foxway.org

  • $wgNumbertext_defaultLang
  • $wgNumbertextLang
翻譯Numbertext扩展,若在translatewiki.net可用

检查使用和版本矩阵。

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.

安裝

  • 下载文件,并将其放置在您extensions/文件夹中的Numbertext目录内。
  • 将下列代码放置在您的LocalSettings.php 的底部:
    require_once "$IP/extensions/Numbertext/Numbertext.php";
    
  •   完成 – 在您的wiki上导航至Special:Version,以验证已成功安装扩展。