Property | Type | Description | |
---|---|---|---|
$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 |
Method | Description | |
---|---|---|
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 |
Method | Description | |
---|---|---|
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 | |
return | mixed | Existing Locale instance on success, NULL on failure |
protected generateAvailableLocalesCollectionByScanningFilesystem ( ) : void | ||
return | void |
public getLocaleChain ( |
||
$locale | ||
return | 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) |
return | 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 | |
return | Existing Locale instance or NULL on failure |
protected getScanBlacklistPattern ( ) : string | ||
return | 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 | |
return | array | Path to the localized file (or $filename when no localized file was found) and the matched locale |
public initializeObject ( ) : void | ||
return | void |
public injectSettings ( array $settings ) : void | ||
$settings | array | |
return | void |
protected VariableFrontend,Neos\Cache\Frontend $cache | ||
return | Neos\Cache\Frontend\VariableFrontend |
protected Configuration,Neos\Flow\I18n $configuration | ||
return |
protected string $localeBasePath | ||
return | string |
protected LocaleCollection,Neos\Flow\I18n $localeCollection | ||
return |
protected PackageManagerInterface,Neos\Flow\Package $packageManager | ||
return | Neos\Flow\Package\PackageManagerInterface |