TranslateGettext::setLocale PHP Method

setLocale() public method

Note that for gettext() to work, you have to make sure this locale is specific enough for your system (e.g. some systems may allow an 'en' locale, but others will require 'en_US', etc.).
public setLocale ( string $locale )
$locale string
    function setLocale($locale)
    {
        $this->locale = $locale;
    }

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;
 }