sfMessageSource_XLIFF class.
Method Summary
-
array|false
&($filename)
Loads the messages from a XLIFF file.
-
DOMDocument
createDOMDocument($xml)
Creates and returns a new DOMDocument instance
-
createMessageTemplate()
-
boolean
delete($message, $catalogue)
Deletes a particular message from the specified catalogue.
-
getTemplate()
-
string
getVariants($catalogue)
Gets the variant for a catalogue depending on the current culture.
-
boolean
save($catalogue)
Saves the list of untranslated blocks to the translation source.
-
boolean
update($text, $target, $comments, $catalogue)
Updates the translation.
catalogues , getCatalogueByDir , getCatalogueList , getCatalogues , getId , getLastModified , getSource , isValidSource , __construct
& , append , factory , getCache , getCatalogueList , getCulture , getLastModified , getSource , isValidSource , load , read , setCache , setCulture , __construct
Method Details
-
(array|false) & ($filename)
Browse code
Loads the messages from a XLIFF file.
returns An array of messages or false if there was a problem loading the file.
-
(DOMDocument) createDOMDocument ($xml)
Browse code
Creates and returns a new DOMDocument instance
-
createMessageTemplate ()
Browse code
-
(boolean) delete ($message, $catalogue)
Browse code
| $message |
the source message to delete. |
| $catalogue |
the catalogue to delete from. |
Deletes a particular message from the specified catalogue.
returns true if deleted, false otherwise.
-
-
(string) getVariants ($catalogue)
Browse code
Gets the variant for a catalogue depending on the current culture.
returns the variant.
-
(boolean) save ($catalogue)
Browse code
| $catalogue |
the catalogue to add to |
Saves 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.
returns true if saved successfuly, false otherwise.
-
(boolean) update ($text, $target, $comments, $catalogue)
Browse code
| $text |
the source string. |
| $target |
the new translation string. |
| $comments |
comments |
| $catalogue |
the catalogue to save to. |
Updates the translation.
returns true if translation was updated, false otherwise.
|