TranslateGettext::setDomain PHP Method

setDomain() public method

The text domain must correspond to the name of the compiled .mo files. E.g. "messages" ==> $dir/LC_MESSAGES/messages.mo "mydomain" ==> $dir/LC_MESSAGES/mydomain.mo
public setDomain ( string $domain )
$domain string
    function setDomain($domain)
    {
        $this->domain = $domain;
    }

Usage Example

 /**
  * Creates a new TranslateGettext filter using the passed in
  * Reader for instantiation.
  * 
  * @param Reader $reader A Reader object providing the underlying stream.
  *               Must not be <code>null</code>.
  * 
  * @return TranslateGettext A new filter based on this configuration, but filtering
  *         the specified reader
  */
 function chain(Reader $reader)
 {
     $newFilter = new TranslateGettext($reader);
     $newFilter->setProject($this->getProject());
     $newFilter->setDomain($this->getDomain());
     $newFilter->setLocale($this->getLocale());
     $newFilter->setDir($this->getDir());
     return $newFilter;
 }