扩展:Numbertext

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Extension:Numbertext and the translation is 42% complete.

Other languages:
Deutsch • ‎English • ‎català • ‎dansk • ‎español • ‎italiano • ‎polski • ‎português • ‎português do Brasil • ‎sicilianu • ‎suomi • ‎中文 • ‎日本語
MediaWiki扩展手册
OOjs UI icon advanced.svg
Numbertext
发布状态: 稳定版
实现 Parser function
描述 允许将数字转化为字符
作者 Pavel Astakhov (Pastakhovtalk)
最新版本 0.10.0 (2014-04-01)
PHP 5.3+
数据更新
许可协议 LGPL/BSD dual-license
下载
例子 test.foxway.org
参数

  • $wgNumbertext_defaultLang
  • $wgNumbertextLang
使用的钩子
ParserFirstCallInit
翻译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
  2. currency - currency of money (sample: "USD", "EUR", "RUB", etc)
  3. 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";
    
  • Yes 完成 – 在您的wiki上导航至Special:Version,以验证扩展已成功安装。