XliffService
class XliffService (View source)
The XLIFF service provides methods to find XLIFF files and parse them to json
Properties
protected string | $xliffBasePath | A relative path for translations inside the package resources. |
|
protected XliffReader | $xliffReader | ||
protected Service | $localizationService | ||
protected VariableFrontend | $xliffToJsonTranslationsCache | ||
protected bool | $scrambleTranslatedLabels | ||
protected array | $packagesRegisteredForAutoInclusion | ||
protected XliffFileProvider | $xliffFileProvider | ||
protected PackageManager | $packageManager |
Methods
Return the json array for a given locale, sourceCatalog, xliffPath and package.
No description
No description
Collect all sources found in the given package as array (key = source, value = true) If sourcesToBeIncluded is an array, only those sources are returned what match the wildcard-patterns in the array-values
Helper method to create the needed json array from a dotted xliff id
Details
string
getCachedJson(Locale $locale)
Return the json array for a given locale, sourceCatalog, xliffPath and package.
The json will be cached.
protected array
getTranslationUnitValue(array $labelValue)
No description
string
getCacheVersion()
No description
protected array
collectPackageSources(PackageInterface $package, array $sourcesToBeIncluded = null)
Collect all sources found in the given package as array (key = source, value = true) If sourcesToBeIncluded is an array, only those sources are returned what match the wildcard-patterns in the array-values
protected void
setArrayDataValue(array $arrayPointer, string $key, string|array $value)
Helper method to create the needed json array from a dotted xliff id