Class \Prado\I18N\core\MessageSource_XLIFF
MessageSource_XLIFF class.
Using XML XLIFF format as the message source for translation. Details and example of XLIFF can be found in the following URLs.
http://www.opentag.com/xliff.htm
http://www-106.ibm.com/developerworks/xml/library/x-localis2/
See the MessageSource::factory() method to instantiate this class.
Class hierarchy
Author: Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>
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 XLIFF file for a specific message catalogue and cultural
vairant.
|
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 |