TranslatorSymfonyTrait¶
-
trait
atk4\core\
TranslatorSymfonyTrait
¶ Source: vendor/atk4/core/src/TranslatorSymfonyTrait.php#8
Properties¶
-
protected static property
atk4\core\TranslatorSymfonyTrait::$
translator
¶ Source: vendor/atk4/core/src/TranslatorSymfonyTrait.php#11 Type: \Symfony\Contracts\Translation\TranslatorInterface
Methods¶
-
public
atk4\core\TranslatorSymfonyTrait::
setTranslator
($translator)¶ Source: Parameters: - $translator (
Symfony\Contracts\Translation\TranslatorInterface
)
Returns: \Symfony\Contracts\Translation\TranslatorInterface
- $translator (
-
public
atk4\core\TranslatorSymfonyTrait::
_
($message, $parameters=null, $domain=null, $locale=null)¶ - Translates the given message.
Source: Parameters: - $message (string) The message to be translated
- $parameters (array | null) Array of parameters used to translate message
- $domain (string | null) The domain for the message or null to use the default
- $locale (string | null) The locale or null to use the default
Throws: \InvalidArgumentException
If the locale contains invalid charactersThrows: Throws: \InvalidArgumentException
If the locale contains invalid charactersThrows: Returns: string The translated string