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

Class: Numbers_Words_es

Source Location: /Numbers_Words-0.16.4/Numbers/Words/lang.es.php

Class Overview

Numbers_Words
   |
   --Numbers_Words_es

Class for translating numbers into Spanish (Castellano).


Author(s):

  • Xavier Noguer

Variables

Methods


Inherited Variables

Inherited Methods

Class: Numbers_Words

Numbers_Words::getLocales()
Lists available locales for Numbers_Words
Numbers_Words::raiseError()
Trigger a PEAR error
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 48]
Class for translating numbers into Spanish (Castellano).

It supports up to decallones (10^6). It doesn't support spanish tonic accents (acentos).



[ Top ]


Class Variables

$lang =  'Spanish'

[line 64]

Language name in English
  • Access: public

Type:   string


[ Top ]

$lang_native =  'Espaņol'

[line 71]

Native language name
  • Access: public

Type:   string


[ Top ]

$locale =  'es'

[line 57]

Locale name
  • Access: public

Type:   string
Overrides:   Array


[ Top ]



Method Detail

_toWords   [line 132]

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

Converts a number to its word representation in Spanish (Castellano).
  • Return: The corresponding word representation
  • Author: Xavier Noguer
  • Since: Numbers_Words 0.16.3
  • Access: protected

Parameters:

integer   $num     An integer between -infinity and infinity inclusive :) that should be converted to a words representation
integer   $power     The power of ten for the rest of the number to the right. For example toWords(12,3) should give "doce mil". Optional, defaults to 0.

[ Top ]


Documentation generated on Wed, 21 Mar 2012 02:30:07 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.