Translation_Entry class encapsulates a translatable string

package pomo

 Methods

PHP4 constructor.

Translation_Entry($args = array()

Parameters

$args

__construct()

__construct(array $args = array()

Parameters

$args

array

associative array, support following keys:

  • singular (string) -- the string to translate, if omitted and empty entry will be created
  • plural (string) -- the plural form of the string, setting this will set {@link $is_plural} to true
  • translations (array) -- translations of the string and possibly -- its plural forms
  • context (string) -- a string differentiating two equal strings used in different contexts
  • translator_comments (string) -- comments left by translators
  • extracted_comments (string) -- comments left by developers
  • references (array) -- places in the code this strings is used, in relative_to_root_path/file.php:linenum form
  • flags (array) -- flags like php-format

Generates a unique key for this entry

key() : string | boolean

Returns

stringbooleanthe key or false if the entry is empty

merge_with()

merge_with(object $other) 

Parameters

$other

object

 Properties

 

$context

$context 

Default

null
 

$extracted_comments

$extracted_comments 

Default

''
 

$flags

$flags 

Default

array()
 

Whether the entry contains a string and its plural form, default is false

$is_plural : boolean

Default

false
 

$plural

$plural 

Default

null
 

$references

$references 

Default

array()
 

$singular

$singular 

Default

null
 

$translations

$translations 

Default

array()
 

$translator_comments

$translator_comments 

Default

''