FileTranslator
final class FileTranslator implements TranslatorInterface (View source)
Resolves source catalogs and runtime overrides with the configured locale fallback
Methods
__construct(ApplicationContext $context, LocalizationConfig $config, TranslationResourceRegistry|null $resources = null, TranslationSourceCatalogInterface|null $sources = null, TranslationOverrideProviderInterface|null $overrides = null)
Configures locale settings, source resources and the optional mutable override provider
setLocale(string|null $locale)
locale()
string|null
get(string $key, array $replacements = [], string|null $locale = null)
string
group(string $group, string|null $locale = null)
array
all(string|null $locale = null)
array
Details
__construct
__construct(ApplicationContext $context, LocalizationConfig $config, TranslationResourceRegistry|null $resources = null, TranslationSourceCatalogInterface|null $sources = null, TranslationOverrideProviderInterface|null $overrides = null)
Configures locale settings, source resources and the optional mutable override provider
locale
string|null
locale()
No description
get
string
get(string $key, array $replacements = [], string|null $locale = null)
No description
group
array
group(string $group, string|null $locale = null)
No description
all
array
all(string|null $locale = null)
No description