Searching is done for the current locale if no $locale parameter is
provided. The search is done according to the configured fallback
rule.
If parameter $strict is provided, searching is done only for the
provided / current locale (without searching of files localized for
more generic locales).
If no localized version of file is found, $filepath is returned without
any change.
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 |