Patched to Drupal 8.4.8 level. See https://www.drupal.org/sa-core-2018-004 and patch...
[yaffs-website] / web / core / lib / Drupal / Core / StringTranslation / Translator / TranslatorInterface.php
1 <?php
2
3 namespace Drupal\Core\StringTranslation\Translator;
4
5 /**
6  * Interface for objects capable of string translation.
7  */
8 interface TranslatorInterface {
9
10   /**
11    * Retrieves English string to given language.
12    *
13    * @param string $langcode
14    *   Language code to translate to.
15    * @param string $string
16    *   The source string.
17    * @param string $context
18    *   The string context.
19    *
20    * @return string|false
21    *   Translated string if there is a translation, FALSE if not.
22    */
23   public function getStringTranslation($langcode, $string, $context);
24
25   /**
26    * Resets translation cache.
27    *
28    * Since most translation systems implement some form of caching, this
29    * provides a way to delete that cache.
30    */
31   public function reset();
32
33 }