\Translation_Entry

Translation_Entry class encapsulates a translatable string

Summary

Methods
Properties
Constants
Translation_Entry()
key()
merge_with()
$is_plural
$context
$singular
$plural
$translations
$translator_comments
$extracted_comments
$references
$flags
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$is_plural

$is_plural : boolean

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

Type

boolean

$context

$context

$singular

$singular

$plural

$plural

$translations

$translations

$translator_comments

$translator_comments

$extracted_comments

$extracted_comments

$references

$references

$flags

$flags

Methods

Translation_Entry()

Translation_Entry(array $args)

Parameters

array $args

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

key()

key() : string|bool

Generates a unique key for this entry

Returns

string|bool —

the key or false if the entry is empty

merge_with()

merge_with( $other)

Parameters

$other