Class CGettextPoFile
CGettextPoFile represents a PO Gettext message file.
-
CComponent
-
CGettextFile
-
CGettextPoFile
Methods summary
public
array
|
#
load( string $file, string $context )
Loads messages from a PO file.
Loads messages from a PO file.
Parameters
- $file
string $file file path
- $context
string $context message context
Returns
array message translations (source message => translated message)
|
public
|
#
save( string $file, array $messages )
Saves messages to a PO file.
Saves messages to a PO file.
Parameters
- $file
string $file file path
- $messages
array $messages message translations (message id => translated message). Note if
the message has a context, the message id must be prefixed with the context with
chr(4) as the separator.
|
protected
string
|
#
encode( string $string )
Encodes special characters in a message.
Encodes special characters in a message.
Parameters
- $string
string $string message to be encoded
Returns
string the encoded message
|
protected
string
|
#
decode( string $string )
Decodes special characters in a message.
Decodes special characters in a message.
Parameters
- $string
string $string message to be decoded
Returns
string the decoded message
|
Methods inherited from CComponent
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|