i18n\Formatter $booleanFormat

$booleanFormat public property The text to be displayed when formatting a boolean value. The first element corresponds to the text displayed for false, the second element for true. Defaults to ['No', 'Yes'], where Yes and No will be translated according to $locale. public array $booleanFormat = null

i18n\DbMessageSource loadMessagesFromDb()

loadMessagesFromDb() protected method Loads the messages from database. You may override this method to customize the message storage in the database. protected array loadMessagesFromDb ( $category, $language )$category string The message category. $language string The target language. return array The messages loaded from database.

i18n\DbMessageSource loadMessages()

loadMessages() protected method Loads the message translation for the specified language and category. If translation for specific locale code such as en-US isn't found it tries more generic en. protected array loadMessages ( $category, $language )$category string The message category $language string The target language return array The loaded messages. The keys are original messages, and the values are translated messages.

i18n\DbMessageSource init()

init() public method Initializes the DbMessageSource component. This method will initialize the $db property to make sure it refers to a valid DB connection. Configured $cache component would also be initialized. public void init ( )throws yii\base\InvalidConfigException if $db is invalid or $cache is invalid.

i18n\DbMessageSource createFallbackQuery()

createFallbackQuery() protected method (available since version 2.0.7) The method builds the yii\db\Query object for the fallback language messages search. Normally is called from loadMessagesFromDb(). See also loadMessagesFromDb(). protected yii\db\Query createFallbackQuery ( $category, $language, $fallbackLanguage )$category string The message category $language string The originally requested language $fallbackLanguage string The target fallback language

i18n\DbMessageSource $sourceMessageTable

$sourceMessageTable public property The name of the source message table. public string $sourceMessageTable = '{{%source_message}}'

i18n\DbMessageSource $messageTable

$messageTable public property The name of the translated message table. public string $messageTable = '{{%message}}'

i18n\DbMessageSource $enableCaching

$enableCaching public property Whether to enable caching translated messages public boolean $enableCaching = false

i18n\DbMessageSource $db

$db public property The DB connection object or the application component ID of the DB connection. After the DbMessageSource object is created, if you want to change this property, you should only assign it with a DB connection object. Starting from version 2.0.2, this can also be a configuration array for creating the object. public yii\db\Connection|array|string $db = 'db'

i18n\DbMessageSource $cachingDuration

$cachingDuration public property The time in seconds that the messages can remain valid in cache. Use 0 to indicate that the cached data will never expire. See also $enableCaching. public integer $cachingDuration = 0