PHP Class Polyglot\Localization\Services\Extractor

Inheritance: extends AbstractService
Show file Open project: anahkiasen/polyglot

Public Methods

Method Description
generateLocale ( string $locale, boolean $clean = true ) : string Generate the files for a locale
getFiles ( ) : Finder Get the views translations are in
getLocaleFile ( string $locale ) : string Get the path to a locale's PO file
setHeaders ( string $file, $locale ) Set headers in a PO file

Protected Methods

Method Description
extract ( array $translated ) : TwigExtractor Get the TwigExtractor instance
runGettext ( array $arguments ) : integer Run gettext with the specified arguments

Method Details

extract() protected method

Get the TwigExtractor instance
protected extract ( array $translated ) : TwigExtractor
$translated array
return TwigExtractor

generateLocale() public method

Generate the files for a locale
public generateLocale ( string $locale, boolean $clean = true ) : string
$locale string
$clean boolean
return string

getFiles() public method

Get the views translations are in
public getFiles ( ) : Finder
return Symfony\Component\Finder\Finder

getLocaleFile() public method

Get the path to a locale's PO file
public getLocaleFile ( string $locale ) : string
$locale string
return string

runGettext() protected method

Run gettext with the specified arguments
protected runGettext ( array $arguments ) : integer
$arguments array
return integer

setHeaders() public method

Set headers in a PO file
public setHeaders ( string $file, $locale )
$file string