symfony API

sfMessageSource_XLIFF Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfMessageSource_XLIFF class.

Inheritence

sfMessageSource_XLIFF  <  sfMessageSource_File < sfMessageSource

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.

Methods inherited from sfMessageSource_File

catalogues , getCatalogueByDir , getCatalogueList , getCatalogues , getId , getLastModified , getSource , isValidSource , __construct

Methods inherited from sfMessageSource

& , append , factory , getCache , getCatalogueList , getCulture , getLastModified , getSource , isValidSource , load , read , setCache , setCulture , __construct

Method Details

  • (array|false) & ($filename) Browse code

    $filename XLIFF file.

    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

    $xml XML string

    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.

  • getTemplate () Browse code

  • (string) getVariants ($catalogue) Browse code

    $catalogue catalogue

    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.