Extension:Numbertext

From MediaWiki.org
Jump to: navigation, search

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil • ‎sicilianu • ‎中文
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
Numbertext

Release status:Extension status stable

ImplementationTemplate:Extension#type Parser function
DescriptionTemplate:Extension#description Allows to transform numbers into words
Author(s)Template:Extension#username Pavel Astakhov (Pastakhovtalk)
Latest versionTemplate:Extension#version 0.10.0 (2014-04-01)
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license LGPL/BSD dual-license
Download
ExampleTemplate:Extension#example test.foxway.org
ParametersTemplate:Extension#parameters
  • $wgNumbertext_defaultLang
  • $wgNumbertextLang
Hooks usedTemplate:Extension#hook
ParserFirstCallInitManual:Hooks/ParserFirstCallInit

Translate the Numbertext extension if it is available at translatewiki.net

Check usage and version matrix.

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

Usage[edit]

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

where:

  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.

Installation[edit]

  • Download and place the file(s) in a directory called Numbertext in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
require_once "$IP/extensions/Numbertext/Numbertext.php";
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.