PHP 클래스 Prado\I18N\core\Gettext\TGettext

GNU gettext file reader and writer. ################################################################# # All protected members of this class are public in its childs. # #################################################################
저자: Michael Wallner ([email protected])
파일 보기 프로젝트 열기: pradosoft/prado 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$file string file path
$meta array associative array containing meta information like project name or content type
$strings array associative array with all [msgid => msgstr] entries

공개 메소드들

메소드 설명
factory ( string $format, string $file = '' ) : object Factory
fromArray ( array $array ) : boolean fromArray
meta2array ( string $meta ) : array meta2array
poFile2moFile ( string $pofile, string $mofile ) : mixed poFile2moFile
prepare ( string $string, boolean $reverse = false ) : string prepare
toArray ( ) : array toArray
toMO ( ) : object toMO
toPO ( ) : object toPO

메소드 상세

factory() 정적인 공개 메소드

Factory
static public factory ( string $format, string $file = '' ) : object
$format string MO or PO
$file string path to GNU gettext file
리턴 object Returns File_Gettext_PO or File_Gettext_MO on success or PEAR_Error on failure.

fromArray() 공개 메소드

Assigns meta info and strings from an array of a structure like that: array( 'meta' => array( 'Content-Type' => 'text/plain; charset=iso-8859-1', 'Last-Translator' => 'Michael Wallner ', 'PO-Revision-Date' => date('Y-m-d H:iO'), 'Language-Team' => 'German ', ), 'strings' => array( 'All rights reserved' => 'Alle Rechte vorbehalten', 'Welcome' => 'Willkommen', ... ) )
또한 보기: toArray()
public fromArray ( array $array ) : boolean
$array array
리턴 boolean

meta2array() 정적인 공개 메소드

meta2array
static public meta2array ( string $meta ) : array
$meta string
리턴 array

poFile2moFile() 정적인 공개 메소드

That's a simple fake of the 'msgfmt' console command. It reads the contents of a GNU PO file and saves them to a GNU MO file.
static public poFile2moFile ( string $pofile, string $mofile ) : mixed
$pofile string path to GNU PO file
$mofile string path to GNU MO file
리턴 mixed Returns true on success or PEAR_Error on failure.

prepare() 정적인 공개 메소드

prepare
static public prepare ( string $string, boolean $reverse = false ) : string
$string string
$reverse boolean
리턴 string

toArray() 공개 메소드

Returns meta info and strings as an array of a structure like that: array( 'meta' => array( 'Content-Type' => 'text/plain; charset=iso-8859-1', 'Last-Translator' => 'Michael Wallner ', 'PO-Revision-Date' => '2004-07-21 17:03+0200', 'Language-Team' => 'German ', ), 'strings' => array( 'All rights reserved' => 'Alle Rechte vorbehalten', 'Welcome' => 'Willkommen', ... ) )
또한 보기: fromArray()
public toArray ( ) : array
리턴 array

toMO() 공개 메소드

toMO
public toMO ( ) : object
리턴 object File_Gettext_MO

toPO() 공개 메소드

toPO
public toPO ( ) : object
리턴 object File_Gettext_PO

프로퍼티 상세

$file 보호되어 있는 프로퍼티

file path
protected string $file
리턴 string

$meta 보호되어 있는 프로퍼티

associative array containing meta information like project name or content type
protected array $meta
리턴 array

$strings 보호되어 있는 프로퍼티

associative array with all [msgid => msgstr] entries
protected array $strings
리턴 array