interface TranslatorInterface in Backup and Migrate 8.4
An interface for a language translation service. Follows the Drupal translation model where a fully formed english string with replacement tokens is passed in and then localized.
Interface TranslatorInterface.
@package BackupMigrate\Core\Service
Hierarchy
- interface \BackupMigrate\Core\Translation\TranslatorInterface
Expanded class hierarchy of TranslatorInterface
All classes that implement TranslatorInterface
1 file declares its use of TranslatorInterface
- PassthroughTranslator.php in lib/
backup_migrate_core/ src/ Translation/ PassthroughTranslator.php
File
- lib/
backup_migrate_core/ src/ Translation/ TranslatorInterface.php, line 14
Namespace
BackupMigrate\Core\TranslationView source
interface TranslatorInterface {
/**
* @param string $string
* The string to be translated.
* @param $replacements
* Any untranslatable variables to be replaced into the string.
* @param $context
* Extra context to help translators distinguish ambiguous strings.
* @return mixed
*/
public function translate($string, $replacements = [], $context = []);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TranslatorInterface:: |
public | function | 1 |