i18n\I18N format()

format() public method Formats a message using yii\i18n\MessageFormatter. public string format ( $message, $params, $language )$message string The message to be formatted. $params array The parameters that will be used to replace the corresponding placeholders in the message. $language string The language code (e.g. en-US, en). return string The formatted message.

i18n\I18N $translations

$translations public property List of yii\i18n\MessageSource configurations or objects. The array keys are message category patterns, and the array values are the corresponding yii\i18n\MessageSource objects or the configurations for creating the yii\i18n\MessageSource objects. The message category patterns can contain the wildcard * at the end to match multiple categories with the same prefix. For example, app/* matches both app/cat1 and app/cat2. The * category pattern will match all cate

i18n\I18N $messageFormatter

$messageFormatter public property The message formatter to be used to format message via ICU message format. public yii\i18n\MessageFormatter getMessageFormatter ( )public void setMessageFormatter ( $value )

i18n\GettextPoFile save()

save() public method Saves messages to a PO file. public void save ( $filePath, $messages )$filePath string File path $messages array Message translations. Array keys are source messages and array values are translated messages: source message => translated message. Note if the message has a context, the message ID must be prefixed with the context with chr(4) as the separator.

i18n\GettextPoFile load()

load() public method Loads messages from a PO file. public array load ( $filePath, $context )$filePath string File path $context string Message context return array Message translations. Array keys are source messages and array values are translated messages: source message => translated message.

i18n\GettextPoFile encode()

encode() protected method Encodes special characters in a message. protected string encode ( $string )$string string Message to be encoded return string The encoded message

i18n\GettextPoFile decode()

decode() protected method Decodes special characters in a message. protected string decode ( $string )$string string Message to be decoded return string The decoded message

i18n\GettextMoFile writeString()

writeString() protected method Writes a string. protected integer writeString ( $fileHandle, $string )$fileHandle resource To write to $string string To be written return integer How many bytes are written

i18n\GettextMoFile writeInteger()

writeInteger() protected method Writes a 4-byte integer. protected integer writeInteger ( $fileHandle, $integer )$fileHandle resource To write to $integer integer To be written return integer How many bytes are written

i18n\GettextMoFile writeBytes()

writeBytes() protected method Write bytes. protected integer writeBytes ( $fileHandle, $bytes )$fileHandle resource To write to $bytes string To be written return integer How many bytes are written