CoolCMS API

DomainTranslator
in package

FinalYes

Translator with a domain prefix for components and templates. Components get the `Nette\Localization\Translator` interface injected, but only the Contributte translator can prefix (it always runs in the application); any other is a wiring error, not a silently untranslated text.

Table of Contents

Methods

for()  : PrefixedTranslator

Methods

for()

public static for(Translator $translator, string|null $domain) : PrefixedTranslator
Parameters
$translator : Translator
$domain : string|null
Return values
PrefixedTranslator
On this page

Search results