## P4A_I18N

Description

p4a internationalization class.

- author: Fabrizio Balliano <fabrizio.balliano@crealabs.it>
- author: Andrea Giardina <andrea.giardina@crealabs.it>

Located in /p4a/p4a_i18n.php (line 46)

Variable Summary
string $charset
string $country
I18N_CURRENCY $currency
array $currency_formats
I18N_DATETIME $datetime
array $datetime_formats
string $language
string $locale
I18N_MESSAGES $messages
I18N_NUMBERS $numbers
array $numbers_formats
Method Summary
mixed autoFormat (mixed $value, string $type)
mixed autoUnformat (mixed $value, string $type)
string getCharset ()
string getCountry ()
string getLanguage ()
string getLocale ()
void loadFormats ()
void p4a_i18n ([string $locale = P4A_LOCALE])
void setCharset ([string $charset = 'UTF-8'])
void setLocale ([string $locale = P4A_LOCALE])
void setSystemLocale ()
Variables
string $charset = 'UTF-8' (line 74)

Here we store the current charset. Default is UTF-8.

- access: private

string $country = NULL (line 67)

Here we store the current country.

- access: private

I18N_CURRENCY $currency = NULL (line 81)

Currency management object.

- access: public

array $currency_formats = NULL (line 88)

Here we store all formats for currency data.

- access: private

I18N_DATETIME $datetime = NULL (line 95)

Date/Time management object.

- access: public

array $datetime_formats = NULL (line 102)

Here we store all formats for date/time data.

- access: private

string $language = NULL (line 60)

Here we store the current language.

- access: private

string $locale = NULL (line 53)

Here we store the current locale.

- access: private

I18N_MESSAGES $messages = NULL (line 109)

Messages management object.

- access: public

I18N_NUMBERS $numbers = NULL (line 116)

Numbers management object.

- access: public

array $numbers_formats = NULL (line 123)

Here we store all formats for numeric data.

- access: private

Methods
autoFormat (line 250)

Calls the p4a default formatter for value with the given type.

If the type in not recognized, $value is returned as is.

- access: public

mixed autoFormat (mixed $value, string $type)

- mixed $value: The value to be formatter
- string $type: The type (date|time|integer|float|decimal|currency)

autoUnformat (line 284)

Calls the p4a default unformatter for value with the given type.

If the type in not recognized, $value is returned as is.

- access: public

mixed autoUnformat (mixed $value, string $type)

- mixed $value: The value to be unformatter
- string $type: The type (date|time|integer|float|decimal|currency)

getCharset (line 219)

Returns the current charset.

- access: public

string getCharset ()
getCountry (line 199)

Returns the current country.

- access: public

string getCountry ()
getLanguage (line 189)

Returns the current language.

- access: public

string getLanguage ()
getLocale (line 179)

Returns the current locale.

- access: public

string getLocale ()
loadFormats (line 228)

Loads all available formats.

- access: private

void loadFormats ()
p4a_i18n (line 130)

Class constructor.

- access: private

void p4a_i18n ([string $locale = P4A_LOCALE])

- string $locale: The desidered locale.

setCharset (line 209)

Sets the charset.

- access: public

void setCharset ([string $charset = 'UTF-8'])

- string $charset: The charset

setLocale (line 140)

Sets the desidered locale (it_IT|en_UK|en_US). Locale name can contain codepage (ru_RU.KOI-8|ru_RU.CP1251).

- access: public

void setLocale ([string $locale = P4A_LOCALE])

- string $locale: The desired locale.

setSystemLocale (line 163)

Sets PHP system level locale

- access: private

void setSystemLocale ()

Documentation generated on Fri, 26 May 2006 12:43:30 +0200 by phpDocumentor 1.3.0RC5