PHP 클래스 Neos\Flow\I18n\Xliff\XliffModel
Please note that plural forms for particular translation unit are accessed
with integer index (and not string like 'zero', 'one', 'many' etc). This is
because they are indexed such way in XLIFF files in order to not break tools'
support.
There are very few XLIFF editors, but they are nice Gettext's .po editors
available. Gettext supports plural forms, but it indexes them using integer
numbers. Leaving it this way in .xlf files, makes it possible to easily convert
them to .po (e.g. using xliff2po from Translation Toolkit), edit with Poedit,
and convert back to .xlf without any information loss (using po2xliff).
파일 보기
프로젝트 열기: neos/flow-development-collection
1 사용 예제들
보호된 프로퍼티들
프로퍼티 |
타입 |
설명 |
|
$cache |
Neos\Cache\Frontend\VariableFrontend |
|
|
$i18nLogger |
Neos\Flow\Log\LoggerInterface |
|
|
$locale |
Neos\Flow\I18n\Locale |
|
|
$sourcePath |
string |
Absolute path to the file which is represented by this class instance. |
|
$xmlParsedData |
array |
Parsed data (structure depends on concrete model). |
|
$xmlParser |
XliffParser |
Concrete XML parser which is set by more specific model extending this
class. |
|
공개 메소드들
메소드 상세
public __construct ( string $sourcePath, Locale $locale ) |
$sourcePath |
string |
|
$locale |
Neos\Flow\I18n\Locale |
The locale represented by the file |
getTargetBySource()
공개 메소드
Returns translated label ("target" tag in XLIFF) from source-target
pair where "source" tag equals to $source parameter.
getTargetByTransUnitId()
공개 메소드
Id is compared with "id" attribute of "trans-unit" tag (see XLIFF
specification for details).
initializeObject()
공개 메소드
When it's called, XML file is parsed (using parser set in $xmlParser)
or cache is loaded, if available.
Injects the Flow_I18n_XmlModelCache cache
public injectCache ( Neos\Cache\Frontend\VariableFrontend $cache ) : void |
$cache |
Neos\Cache\Frontend\VariableFrontend |
|
리턴 |
void |
|
프로퍼티 상세
protected VariableFrontend,Neos\Cache\Frontend $cache |
리턴 |
Neos\Cache\Frontend\VariableFrontend |
|
protected LoggerInterface,Neos\Flow\Log $i18nLogger |
리턴 |
Neos\Flow\Log\LoggerInterface |
|
protected Locale,Neos\Flow\I18n $locale |
리턴 |
Neos\Flow\I18n\Locale |
|
Absolute path to the file which is represented by this class instance.
protected string $sourcePath |
리턴 |
string |
|
$xmlParsedData 보호되어 있는 프로퍼티
Parsed data (structure depends on concrete model).
protected array $xmlParsedData |
리턴 |
array |
|
Concrete XML parser which is set by more specific model extending this
class.
protected XliffParser,Neos\Flow\I18n\Xliff $xmlParser |
리턴 |
XliffParser |
|