2017 © Pedro Peláez
 

library terbilang

Convert numbers into words in Indonesian language

image

nasution/terbilang

Convert numbers into words in Indonesian language

  • Friday, May 13, 2016
  • by mul14
  • Repository
  • 1 Watchers
  • 29 Stars
  • 790 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 12 Forks
  • 1 Open issues
  • 4 Versions
  • 5 % Grown

The README.md

Terbilang

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Convert numbers into words (and vice-versa) in Indonesian language., (*2)

Installation

Run composer command, (*3)

composer require nasution/terbilang

Usage

Using the terbilang() and tersebut() helper:, (*4)

<?php

require 'vendor/autoload.php';

echo terbilang(421); // empat ratus dua puluh satu (string)
echo tersebut('empat ratus dua puluh satu'); // 421.0 (float)

Old examples:, (*5)

<?php

require 'vendor/autoload.php';

echo \Nasution\Terbilang::convert(42); // empat puluh dua
echo \Nasution\Terbilang::revert('empat puluh dua');  // 42.0 (float)

You can also import the class to make it more convenient to use:, (*6)

<?php

require 'vendor/autoload.php';

use Nasution\Terbilang;

echo Terbilang::convert('123304'); // seratus dua puluh tiga ribu tiga ratus empat
echo Terbilang::revert('seratus dua puluh tiga ribu tiga ratus empat'); // 123304.0 (float)

Another examples:, (*7)

echo Terbilang::convert('1000000');          // satu juta
echo Terbilang::convert('1000000000');       // satu milyar
echo Terbilang::convert('1000000000000');    // satu triliun
echo Terbilang::convert('1000000000000000'); // satu kuadriliun


echo Terbilang::revert('satu juta');       // 1000000
echo Terbilang::revert('satu milyar');     // 1000000000
echo Terbilang::revert('satu triliun');    // 1000000000000
echo Terbilang::revert('satu kuadriliun'); // 1000000000000000
echo Terbilang::revert('seratus milyar tiga puluh juta dua puluh ribu sepuluh'); // 100030020010.0

You can also use dot notation on Terbilang::convert() to separate the numbers:, (*8)

echo Terbilang::convert('1.300.000');       // satu juta tiga ratus ribu
echo Terbilang::convert('100.030.020.010'); // seratus milyar tiga puluh juta dua puluh ribu sepuluh

The Versions

13/05 2016

dev-master

9999999-dev https://github.com/mul14/terbilang-php

Convert numbers into words in Indonesian language

  Sources   Download

WTFPL

The Requires

  • php >= 5.3.3

 

The Development Requires

indonesia terbilang

13/05 2016

v0.0.3

0.0.3.0 https://github.com/mul14/terbilang-php

Convert numbers into words in Indonesian language

  Sources   Download

WTFPL

The Requires

  • php >= 5.3.3

 

The Development Requires

indonesia terbilang

10/11 2014

0.0.2

0.0.2.0 https://github.com/mul14/terbilang-php

Convert numbers into words in Indonesian language

  Sources   Download

WTFPL

The Requires

  • php >= 5.3.3

 

The Development Requires

indonesia terbilang

10/11 2014

0.0.1

0.0.1.0 https://github.com/mul14/terbilang-php

Convert numbers into words in Indonesian language

  Sources   Download

WTFPL

The Requires

  • php >= 5.3.3

 

The Development Requires

indonesia terbilang