Numbers_Words
[ class tree: Numbers_Words ] [ index: Numbers_Words ] [ all elements ]

Class: Numbers_Words_Locale_ro_RO

Source Location: /Numbers_Words-0.18.1/Numbers/Words/Locale/ro/RO.php

Class Overview

Numbers_Words
   |
   --Numbers_Words_Locale_ro_RO

Class for translating numbers into Romanian (Romania) with the correct diacritical signs (commas).


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: Numbers_Words

Numbers_Words::getLocales()
Lists available locales for Numbers_Words
Numbers_Words::loadLocale()
Load the given locale and return class name
Numbers_Words::normalizeNumber()
Removes redundant spaces, thousands separators, etc.
Numbers_Words::toCurrency()
Converts a currency value to word representation (1.02 => one dollar two cents) If the number has not any fraction part, the "cents" number is omitted.
Numbers_Words::toWords()
Converts a number to its word representation

Class Details

[line 39]
Class for translating numbers into Romanian (Romania) with the correct diacritical signs (commas).


[ Top ]


Class Variables

$def_currency =  'RON'

[line 225]

The default currency name
  • Access: public

Type:   string


[ Top ]

$lang =  'Romanian'

[line 56]

Language name in English.
  • Access: public

Type:   string


[ Top ]

$lang_native =  'Română'

[line 63]

Native language name.
  • Access: public

Type:   string


[ Top ]

$locale =  'ro_RO'

[line 49]

Locale name.
  • Access: public

Type:   string
Overrides:   Array


[ Top ]



Method Detail

toCurrencyWords   [line 674]

string toCurrencyWords( integer $int_curr, integer $decimal, [integer $fraction = false], [integer $convert_fraction = true])

Converts a currency value to its word representation (with monetary units) in Romanian
  • Return: The corresponding word representation for the currency
  • Author: Bogdan Stăncescu <bogdan@moongate.ro>
  • Access: public

Parameters:

integer   $int_curr   —  An international currency symbol as defined by the ISO 4217 standard (three characters)
integer   $decimal   —  A money total amount without fraction part (e.g. amount of dollars)
integer   $fraction   —  Fractional part of the money amount (e.g. amount of cents) Optional. Defaults to false.
integer   $convert_fraction   —  Convert fraction to words (left as numeric if set to false). Optional. Defaults to true.

[ Top ]

_toWords   [line 580]

string _toWords( [integer $num = 0], [array $noun = array()])

Converts a number to its word representation in Romanian

Romanian uses a complex set of rules for numerals, and a lot of inflections are interdependent. As such, this class implements an easy means for authors to count either abstract numbers (in which case the second parameter should be omitted), or actual nouns. In the latter case, a noun must be provided as an indexed array containing three values:

  1. => the singular form
  2. => the plural form
  3. => the noun's gender, as one of the following constants: - Numbers_Words::GENDER_MASCULINE for masculine nouns - Numbers_Words::GENDER_FEMININE for feminine nouns - Numbers_Words::GENDER_NEUTER for neuter nouns

  • Return: The corresponding word representation
  • Author: Bogdan Stăncescu <bogdan@moongate.ro>
  • Access: protected

Parameters:

integer   $num   —  An integer (or its string representation) between 9.99*-10^302 and 9.99*10^302 (999 centillions) that need to be converted to words
array   $noun   —  Optionally you can also provide a noun to be formatted accordingly

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:59:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.