Class X2MessageSource
This is a modified version of the default Yii class. The only change that has been made is the inclusion of "common.php" as a shared source of translation messages. Ctrl + F for "X2CHANGE" to find the exact location of this customization.
- CComponent
- CApplicationComponent implements IApplicationComponent
- CMessageSource
- X2MessageSource
public
|
|
protected
string
|
#
translateMessage( string $category, string $message, string $language )
Translates the specified message. If the message is not found, an |
protected
string
|
#
getMessageFile( string $category, string $language )
Determines the message file name based on the given category and language. If
the category name contains a dot, it will be split into the module class name
and the category name. In this case, the message file will be assumed to be
located within the 'messages' subdirectory of the directory containing the
module class file. Otherwise, the message file is assumed to be under the |
protected
array
|
#
loadMessages( string $category, string $language )
Loads the message translation for the specified language and category. |
getLanguage(),
onMissingTranslation(),
setLanguage(),
translate()
|
getIsInitialized()
|
__call(),
__get(),
__isset(),
__set(),
__unset(),
asa(),
attachBehavior(),
attachBehaviors(),
attachEventHandler(),
canGetProperty(),
canSetProperty(),
detachBehavior(),
detachBehaviors(),
detachEventHandler(),
disableBehavior(),
disableBehaviors(),
enableBehavior(),
enableBehaviors(),
evaluateExpression(),
getEventHandlers(),
hasEvent(),
hasEventHandler(),
hasProperty(),
raiseEvent()
|
string |
CACHE_KEY_PREFIX
|
'Yii.CPhpMessageSource.' |
public
integer
|
$cachingDuration | 0 |
#
the time in seconds that the messages can remain valid in cache. Defaults to 0, meaning the caching is disabled. |
public
string
|
$cacheID | 'cache' |
#
the ID of the cache application component that is used to cache the messages. Defaults to 'cache' which refers to the primary cache application component. Set this property to false if you want to disable caching the messages. |
public
string
|
$basePath |
|
#
the base path for all translated messages. Defaults to null, meaning the "messages" subdirectory of the application directory (e.g. "protected/messages"). |
public
array
|
$extensionPaths | array() |
#
the message paths for extensions that do not have a base class to use as category prefix. The format of the array should be: array( 'ExtensionName' => 'ext.ExtensionName.messages', ) Where the key is the name of the extension and the value is the alias to the path of the "messages" subdirectory of the extension. When using Yii::t() to translate an extension message, the category name should be set as 'ExtensionName.categoryName'. Defaults to an empty array, meaning no extensions registered. |
public
boolean
|
$logBlankMessages | true |
#
Whether or not to log a missing translation if the index is found in the messages file, but the translation message is blank. For example, 'X2Engine'=>'' would trigger an onMissingTranslation event if this parameter is set to true, but will not trigger if it is set to false. |
$forceTranslation
|
$behaviors
|
$language
|
$isInitialized
|