Свойство | Тип | Описание | |
---|---|---|---|
$cache | Neos\Cache\Frontend\VariableFrontend | ||
$configuration | |||
$localeBasePath | string | The base path to use in filesystem operations. It is changed only in tests. | |
$localeCollection | A collection of Locale objects representing currently installed locales, in a hierarchical manner. | ||
$packageManager | Neos\Flow\Package\PackageManagerInterface | ||
$settings | array |
Метод | Описание | |
---|---|---|
findBestMatchingLocale ( |
Returns Locale object which is the most similar to the "template" Locale object given as parameter, from the collection of locales available in the current Flow installation. | |
getConfiguration ( ) : |
||
getLocaleChain ( |
Build a chain of locale objects according to the fallback rule and the available locales. | |
getLocalizedFilename ( string $pathAndFilename, |
Returns the path to the existing localized version of file given. | |
getParentLocaleOf ( |
Returns a parent Locale object of the locale provided. | |
getXliffFilenameAndPath ( string $path, string $sourceName, |
Returns the path to the existing localized version of file given. | |
initializeObject ( ) : void | Initializes the locale service | |
injectSettings ( array $settings ) : void |
Метод | Описание | |
---|---|---|
generateAvailableLocalesCollectionByScanningFilesystem ( ) : void | Finds all Locale objects representing locales available in the Flow installation. This is done by scanning all Private and Public resource files of all active packages, in order to find localized files. | |
getScanBlacklistPattern ( ) : string | Returns a regex pattern including enclosing characters, that matches any of the configured blacklist paths inside "Neos.Flow.i18n.scan.excludePatterns". |
public findBestMatchingLocale ( |
||
$locale | The "template" Locale to be matched | |
Результат | mixed | Existing Locale instance on success, NULL on failure |
protected generateAvailableLocalesCollectionByScanningFilesystem ( ) : void | ||
Результат | void |
public getConfiguration ( ) : |
||
Результат |
public getLocaleChain ( |
||
$locale | ||
Результат | array |
public getLocalizedFilename ( string $pathAndFilename, |
||
$pathAndFilename | string | Path to the file |
$locale | Desired locale of localized file | |
$strict | boolean | Whether to match only provided locale (TRUE) or search for best-matching locale (FALSE) |
Результат | array | Path to the localized file (or $filename when no localized file was found) and the matched locale |
public getParentLocaleOf ( |
||
$locale | The Locale to search parent for | |
Результат | Existing Locale instance or NULL on failure |
protected getScanBlacklistPattern ( ) : string | ||
Результат | string | The regex pattern matching the configured blacklist |
public getXliffFilenameAndPath ( string $path, string $sourceName, |
||
$path | string | Base directory to the translation files |
$sourceName | string | name of the translation source |
$locale | Desired locale of XLIFF file | |
Результат | array | Path to the localized file (or $filename when no localized file was found) and the matched locale |
public initializeObject ( ) : void | ||
Результат | void |
public injectSettings ( array $settings ) : void | ||
$settings | array | |
Результат | void |
protected VariableFrontend,Neos\Cache\Frontend $cache | ||
Результат | Neos\Cache\Frontend\VariableFrontend |
protected Configuration,Neos\Flow\I18n $configuration | ||
Результат |
protected string $localeBasePath | ||
Результат | string |
protected LocaleCollection,Neos\Flow\I18n $localeCollection | ||
Результат |
protected PackageManagerInterface,Neos\Flow\Package $packageManager | ||
Результат | Neos\Flow\Package\PackageManagerInterface |