Class P4A_I18N

Description

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


	
			
Variable Summary
 string $language
 string $locale
 string $region
 Zend_Locale $_locale_engine
 Zend_Translate_Adapter_Array $_translation_engine
Method Summary
 P4A_I18N __construct ([string $locale = P4A_LOCALE])
 mixed format (mixed $value, string $type, [integer $num_of_decimals = null], [boolean $throw_exception = true])
 string getLanguage ()
 string getLocale ()
 Zend_Locale getLocaleEngine ()
 string getRegion ()
 P4A_I18N mergeTranslation ( $messages)
 void mergeTranslationFile (string $file,  &$messages, array $messages)
 mixed normalize (mixed $value, string $type, [boolean $throw_exception = true])
 void setLocale ([string $locale = P4A_LOCALE])
 string translate (string $string)
 mixed _format (mixed $value, string $type, integer $num_of_decimals)
 mixed _normalize (mixed $value, string $type)
Variables
integer $first_day_of_the_week = 0 (line 64)
  • access: private
string $language = null (line 54)
  • access: private
string $locale = null (line 49)
  • access: private
string $region = null (line 59)
  • access: private
Zend_Locale $_locale_engine = null (line 69)
  • access: protected
Zend_Translate_Adapter_Array $_translation_engine = null (line 74)
  • access: protected
Methods
Constructor __construct (line 79)
  • access: public
P4A_I18N __construct ([string $locale = P4A_LOCALE])
  • string $locale
format (line 178)

Reads a normalized value, localizes and returns it.

Returns an empty string if no value is passed.

  • access: public
mixed format (mixed $value, string $type, [integer $num_of_decimals = null], [boolean $throw_exception = true])
  • mixed $value
  • string $type: (boolean|date|time|integer|float|decimal|currency)
  • integer $num_of_decimals: used only if type is float or decimal
  • boolean $throw_exception: do you want this function to throw an exception on error?
getFirstDayOfTheWeek (line 337)
integer getFirstDayOfTheWeek ()
getLanguage (line 143)
  • access: public
string getLanguage ()
getLocale (line 135)
  • access: public
string getLocale ()
getLocaleEngine (line 300)

Clones and return the Zend_Locale engine

  • access: public
Zend_Locale getLocaleEngine ()
getRegion (line 151)
  • access: public
string getRegion ()
mergeTranslation (line 126)

Adds translation messages to the translation pool

  • access: public
P4A_I18N mergeTranslation ( $messages)
  • array $messages
mergeTranslationFile (line 110)

Reads a translation file (gettext) and merges it to the messages array

  • access: private
void mergeTranslationFile (string $file,  &$messages, array $messages)
  • string $file
  • array $messages
  • &$messages
normalize (line 243)

Reads a localized value, normalizes and returns it

  • access: public
mixed normalize (mixed $value, string $type, [boolean $throw_exception = true])
  • mixed $value
  • string $type: (boolean|date|time|integer|float|decimal|currency)
  • boolean $throw_exception: do you want this function to throw an exception on error?
setFirstDayOfTheWeek (line 305)
  • access: private
void setFirstDayOfTheWeek ()
setLocale (line 88)

Sets the desidered locale (it_IT|en_UK|en_US).

  • access: public
void setLocale ([string $locale = P4A_LOCALE])
  • string $locale
translate (line 160)
  • access: public
string translate (string $string)
  • string $string
_format (line 199)

Reads a normalized value, localizes and returns it.

Returns an empty string if no value is passed.

  • access: private
mixed _format (mixed $value, string $type, integer $num_of_decimals)
  • mixed $value
  • string $type: (boolean|date|time|integer|float|decimal|currency)
  • integer $num_of_decimals: used only if type is float or decimal
_normalize (line 263)

Reads a localized value, normalizes and returns it.

Returns an empty string if no value is passed.

  • access: private
mixed _normalize (mixed $value, string $type)
  • mixed $value
  • string $type: (boolean|date|time|integer|float|decimal|currency)

Documentation generated on Tue, 02 Sep 2008 10:04:04 +0200 by phpDocumentor 1.4.2