Class gettext_reader

Description

Class that uses parsed translation input objects

Located in /class/l10n/gettext.class.php (line 34)


	
			
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 40)

holds error code (0 if no error)

  • access: public
Methods
Constructor gettext_reader (line 75)

constructor that requires StreamReader object

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

binary search for string

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

extract plural forms header

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

get a string with particular number

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

get translated string with particular number

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

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 57)
void readint ()
select_string (line 247)

find out the appropriate form number

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

translate string

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

Documentation generated on Mon, 13 Jan 2020 04:22:39 +0100 by phpDocumentor 1.4.3