Class \Prado\I18N\core\MessageSource_PHP
MessageSource_PHP class.
Using PHP arrays as the message source for translation.
See the MessageSource::factory() method to instantiate this class.
Class hierarchy
Author: Fabio Bas <ctrlaltca[at]gmail[dot]com>Since: 4.0
public
|
|
public
|
catalogues() : array<string|int, mixed>
Returns a list of catalogue and its culture ID.
E.g. array('messages','en_AU') |
public
|
delete(string $message[, string $catalogue = 'messages' ]) : bool
Delete a particular message from the specified catalogue.
|
public
|
save([string $catalogue = 'messages' ]) : bool
Save the list of untranslated blocks to the translation source.
If the translation was not found, you should add those strings to the translation source via the append() method. |
public
|
update(string $text, string $target, string $comments[, string $catalogue = 'messages' ]) : bool
Update the translation.
|
protected
|
|
protected
|
getCatalogueList(string $catalogue) : array<string|int, mixed>
Get all the variants of a particular catalogue.
|
protected
|
getCatalogues([null|mixed $dir = null ][, null|mixed $variant = null ]) : array<string|int, mixed>
Returns a list of catalogue and its culture ID. This takes care
of directory structures.
E.g. array('messages','en_AU') |
protected
|
getLastModified(string $source) : int
Get the last modified unix-time for this particular catalogue+variant.
Just use the file modified time. |
protected
|
getSource(string $variant) : string
Get the PHP file for a specific message catalogue and cultural
variant.
|
protected
|
|
protected
|
|
protected
|
|
protected
|
|
private
|
getCatalogueByDir(string $catalogue) : array<string|int, mixed>
Traverse through the directory structure to find the catalogues.
This should only be called by getCatalogueList() |
private
|
getVariants([string $catalogue = 'messages' ]) : string
Get the variant for a catalogue depending on the current culture.
|
append, factory, getCache, getCulture, load, read, setCache, setCulture, getCatalogueList, getLastModified, getSource, isValidSource, loadData, __construct |