symfony API

sfMessageFormat Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.0 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.0 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.

sfMessageFormat class.

Method Summary

Method Details

  • (string) format (, , , ) Browse code

    Formats the string. That is, for a particular string find

    the corresponding translation. Variable subsitution is performed
    for the $args parameter. A different catalogue can be specified
    using the $catalogue parameter.
    The output charset is determined by $this->getCharset();

    returns translated string.

  • formatExists () Browse code

  • (string) formatString (, , ) Browse code

    Do string translation.

    returns translated string.

  • (string) getCharset () Browse code

    Gets the charset for message output. Default is UTF-8.

    returns charset, default UTF-8

  • getFormattedString () Browse code

  • (MessageSource) getSource () Browse code

    Gets the message source.

  • loadCatalogue () Browse code

    Loads the message from a particular catalogue. A listed

    loaded catalogues is kept to prevent reload of the same
    catalogue. The load catalogue messages are stored
    in the $this->message array.

  • replaceArgs () Browse code

  • setCharset () Browse code

    Sets the charset for message output.

  • setUntranslatedPS () Browse code

    Sets the prefix and suffix to append to untranslated messages.

    e.g. $postscript=array('[T]','[/T]'); will output
    "[T]Hello[/T]" if the translation for "Hello" can not be determined.

  • __construct (, ) Browse code

    Constructor.

    Create a new instance of sfMessageFormat using the messages
    from the supplied message source.