TranslatableTrait

trait atk4\core\TranslatableTrait
If a class use this trait, string can be translated calling method translate.
Source:vendor/atk4/core/src/TranslatableTrait.php#8

Properties

public static property atk4\core\TranslatableTrait::$_translatableTrait
Check this property to see if trait is present in the object.
Source:vendor/atk4/core/src/TranslatableTrait.php#15
Type:bool

Methods

public atk4\core\TranslatableTrait::_($message, $parameters=null, $domain=null, $locale=null)
Translates the given message.
Source:

vendor/atk4/core/src/TranslatableTrait.php#27

Parameters:
  • $message (string) The message to be translated
  • $parameters (array) 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
Returns:

string The translated string

protected atk4\core\TranslatableTrait::processMessage($message, $parameters=null)
Source:vendor/atk4/core/src/TranslatableTrait.php#45
protected atk4\core\TranslatableTrait::processMessagePlural($message, $parameters=null)
Source:vendor/atk4/core/src/TranslatableTrait.php#50