| package | pomo |
|---|
add_entry(array|\Translation_Entry $entry) : boolean
array\Translation_Entry
booleantrue on success, false if the entry doesn't have a keyadd_entry_or_merge(array|\Translation_Entry $entry) : boolean
array\Translation_Entry
booleanget_header(string $header)
string
get_plural_forms_count() : integer
integermerge_originals_with(object $other)
object
merge_with(Object $other) : void
ObjectAnother Translation object, whose translations will be merged in this one (passed by reference).
select_plural_form(integer $count)
Here, in the base Translations class, the common logic for English is implemented: 0 if there is one element, 1 otherwise
This function should be overridden by the sub-classes. For example MO/PO can derive the logic from their headers.
integernumber of items
set_header(string $header, string $value)
If the header already exists, it will be overwritten
TODO: this should be out of this class, it is gettext specific
stringheader name, without trailing :
stringheader value, without trailing \n
set_headers(array $headers)
array
translate(string $singular, string $context = null) : string
string
string
stringtranslate_entry(\Translation_Entry $entry)
\Translation_Entry
translate_plural(string $singular, string $plural, integer $count, string $context = null)
string
string
integer
string
$entries
array()$headers
array()