final class FileTranslationSourceCatalog implements TranslationSourceCatalogInterface (View source)

Reads and combines physical translation files while retaining their provenance

Methods

__construct(ApplicationContext $context, TranslationResourceRegistry|null $resources = null)

Configures application paths and the registry of provider resource contributions

array

Returns locales with at least one physical source file

array
array
groups(string $locale)

Returns groups physically covered by the selected locale

array
array
entries(string|null $locale = null)

Returns effective source values and all contributions without locale fallback

array
array
lines(string $locale, string $group)

Returns effective source values for one group and exact locale

array

Details

__construct

__construct(ApplicationContext $context, TranslationResourceRegistry|null $resources = null)

Configures application paths and the registry of provider resource contributions

Parameters

ApplicationContext $context
TranslationResourceRegistry|null $resources

locales

array locales()

Returns locales with at least one physical source file

Return Value

array

groups

array groups(string $locale)

Returns groups physically covered by the selected locale

Parameters

string $locale

Return Value

array

entries

array entries(string|null $locale = null)

Returns effective source values and all contributions without locale fallback

Parameters

string|null $locale

Return Value

array

lines

array lines(string $locale, string $group)

Returns effective source values for one group and exact locale

Parameters

string $locale
string $group

Return Value

array