Class gettext_reader

Description

Class that uses parsed translation input objects

Located in /nasmail/class/l10n/gettext.class.php (line 35)


	
			
Variable Summary
 integer $error
Method Summary
 boolean gettext_reader (object $Reader)
 void find_string (string $string, integer $start, integer $end)
 string get_plural_forms ()
 string get_string_number (integer $num)
 string get_translation_number (integer $num)
 void load_tables ([boolean $translations = false])
 string ngettext (string $single, string $plural, string $number)
 void readint ()
 integer select_string (integer $n)
 string translate (string $string)
Variables
integer $error = 0 (line 41)

holds error code (0 if no error)

  • access: public
Methods
Constructor gettext_reader (line 76)

constructor that requires StreamReader object

  • return: false, if some error with stream
boolean gettext_reader (object $Reader)
  • object $Reader
find_string (line 176)

binary search for string

void find_string (string $string, integer $start, integer $end)
  • string $string
  • integer $start
  • integer $end
get_plural_forms (line 223)

extract plural forms header

  • return: plural-forms header string
string get_plural_forms ()
get_string_number (line 142)

get a string with particular number

  • return: untranslated string
string get_string_number (integer $num)
  • integer $num
get_translation_number (line 158)

get translated string with particular number

  • return: translated string
string get_translation_number (integer $num)
  • integer $num
load_tables (line 113)
void load_tables ([boolean $translations = false])
  • boolean $translations: do translation have to be loaded
ngettext (line 269)

translate string with singular/plural forms

string ngettext (string $single, string $plural, string $number)
  • string $single: English singural form of translation
  • string $plural: English plural form of translation
  • string $number: count
readint (line 58)
void readint ()
select_string (line 248)

find out the appropriate form number

integer select_string (integer $n)
  • integer $n: count
translate (line 210)

translate string

  • return: translated string
string translate (string $string)
  • string $string: English string

Documentation generated on Sun, 22 Nov 2009 17:36:35 +0200 by phpDocumentor 1.4.3